Macro to-Select qry-Run rpt-Update qry (1 Viewer)

Gina

Registered User.
Local time
Today, 09:54
Joined
Apr 15, 2000
Messages
30
I am trying to figure out set up a command button in a form that runs a select query using the parameter "Between..and.." then runs a report using the same criteria and if o.k., then runs an update query using the same criteria without asking the user the parameters 3 times. I'm not familiar with VBA. Any help/suggestions would be appreciated.
 

Axis

Registered User.
Local time
Today, 14:54
Joined
Feb 3, 2000
Messages
74
You don't have to run a query before opening a report - just use the query as the record source for the report. Use the command button to open the report in Print Preview, and it will automatically show what you would get from running the query.

You can run an update query from a command button, but you need to be very careful about what is being updated. It's a good idea to include a message box or other form that lets the user confirm that they want to update the table. You'll also need to let the user enter the data to be updated unless it is something simple like today's date. You can run an update query from a command button using a macro with the Run SQL action.
 

Gina

Registered User.
Local time
Today, 09:54
Joined
Apr 15, 2000
Messages
30
Thanks Axis I will give it a try.
 

Users who are viewing this thread

Top Bottom