Code accompanying Form

D

Dennis

2003

Currently 1st time design/use of form.

I am not sure how to code a form. Is there a wizard? Does creating a form
and/or buttons generate any code?

The form will have 4 radial buttons.

I would like the form to open on FileOpen

Would like the user to select any, or up to all, radial buttons.

I do not know where to place the code. (What is macro code vs form code?)


Macro????
OnOpen
Open MainForm

Button #1 (If checked on MainForm)
Run query #1
Copy results to c:\Reports\Results#1.mdb
Button #2 (If checked on MainForm)
Run query #2
Copy results to c:\Reports\Results#2.mdb
Button #3 (If checked on MainForm)
Run query #3
Copy results to c:\Reports\Results#3.mdb
Button #4 (If checked on MainForm)
Run query #4
Copy results to c:\Reports\Results#4.mdb

Thanks in Advance

EagleOne
 
E

Evi

Haven't you experimented, Dennis?

Do practice on a copy of the db and on a copy of the Results mdb first
before actually changing any data.

Creating a form does not create any code but if you add a button in Design
view the wizard should give you a list of choices one (under Miscellaneous)
being to run a query. You can view the code by clicking on the Code button
on the Toolbar in the form's design view.
The bit where you will need alot more help is the line that says

Copy results to c:\Reports\Results#1.mdb

That doesn't make much sense in Database terms. I'm guessing you are talking
about exporting the data to another database. Presumably there is a good
reason why you need to do this rather than just linking the two databases?

To get a form to open when the db opens, click on Tools, StartUp and choose
your form there.

Evi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top