473,320 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Access Macros

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
5 1511

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
"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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
5
by: asd987 | last post by:
Hi, I'm now working with Access 2000 (English) and I'm searching for an option which I can't find. I used to work with Acces 97 (Dutch) and there was a possibility to record a macro. I used this...
5
by: Param | last post by:
I would like to know if I convert Access 97 Prod to XP prod, what kind of problems I am going to have. Please highlight the points in general. I heard that Macros do not work if converted to XP??...
3
by: Momoko | last post by:
Hi, I have three Access Databases, say A, B and Main, in which data flows between Main and A, Main and B. Within A and B, there are macros that trigger computation within the databases. I need...
6
by: Reg | last post by:
At present I'm running a number of macros with a schedular on my computer to update and maintain databases within our network. All my backends contain the tables that the macros update. But all the...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
10
by: Bugs | last post by:
Hi I have distributed an mdb file that works fine on my PC using Access 2003, but when a copy I sent to someone running Access2003 he gets the error message "missing the intranet or the...
4
by: Suzette | last post by:
I have an excel file that automatically updates when opened, pulling information from an Access database into into various pivot tables. I created a macro in Access to perform various necessary...
1
by: ishwarjoshi | last post by:
I am in the process of upgrading an old Access ADP/SQL 2000 App to Access 2007 ADP/SQL 2005. There are a lot of buttons in the Access form which are calling Access Macros, the Macros call...
0
by: ARC | last post by:
Hello all, For right-click (shortcut) menus in access 2007, I've been using a round-about method of opening access 97 on an old computer, modifying my own custom shortcut menus, then importing...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.