By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,062 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,062 IT Pros & Developers. It's quick & easy.

Access Macros

P: n/a
Hi,

I was just wondering, is there a way to create a macro everytime a
certain database is created? I mean, on its own.

I'm writing a VB.Net program that requires me to delete the database
everytime, before executing the code. The code then creates another
database and tables. Is there a way to create a macro is VB.net so I
can have a report ready to go as soon as I open access?

Justin

Oct 26 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a

Justin Fancy wrote:
Hi,

I was just wondering, is there a way to create a macro everytime a
certain database is created? I mean, on its own.

I'm writing a VB.Net program that requires me to delete the database
everytime, before executing the code. The code then creates another
database and tables. Is there a way to create a macro is VB.net so I
can have a report ready to go as soon as I open access?

Justin
I wouldn't use macros unless you absolutely have to. Use VBA.
Kill(Pathname) will delete the database.

Oct 26 '06 #2

P: n/a
"Justin Fancy" <ju*********@gmail.comwrote in
news:11*********************@f16g2000cwb.googlegro ups.com:
I'm writing a VB.Net program that requires me to delete the database
everytime, before executing the code.
No, it doesn't.

--
Lyle Fairfield
Oct 26 '06 #3

P: n/a
"Lyle Fairfield" wrote
>I'm writing a VB.Net program that requires me to delete the database
everytime, before executing the code.

No, it doesn't.
I'd agree that if our Dot Netter friend explained what the VB.NET program
was really trying to accomplish, that _someone_ here could offer a
suggestion that did not "require" deleting the DB every time.

Larry
Oct 26 '06 #4

P: n/a
Justin Fancy wrote:

I'm writing a VB.Net program that requires me to delete the database
everytime, before executing the code. The code then creates another
database and tables.
Sorry, but that seems ridiculous on first glance. On any database
platform. UNless it's some sort of tool for setting up instructional
mdbs for classes.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Oct 26 '06 #5

P: n/a
Justin Fancy wrote:
is there a way to create a macro everytime a
certain database is created?
Yes, you can but wouldn't it be easier to *copy* a template database that has
no tables or other objects except this macro, then create the new tables in
the copy via VB.Net?
I'm writing a VB.Net program that requires me to delete the database
everytime, before executing the code.
The only legitimate reason I can think of for doing that is to create temp
tables in a temp db so as to avoid bloat in the *real* db. If that's not the
reason maybe you can explain what it is you need to do and we can suggest
alternatives, because I'm sure you've gathered by now that deleting a
database every time is a very odd requirement.

--
Message posted via http://www.accessmonster.com

Oct 26 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.