Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3 Queries - One Command

Status
Not open for further replies.

eriel3

Programmer
Mar 19, 2004
30
US
I know this is a dumb question, but hey still need the answer.

I have several update queries that I want to run at one time on a form. Instead of putting 3 different buttons on my form to run this query, how can i tell it to run from the click of one button. Also, I need it to update immediate on the form so that the new information will show up. Right now, when I hit update, I have to go out of the form and the go back in to see the updated information.


Help!
 
No dumb questions.. not asking questions is dumb.

In your button's on click event chuck in the following code..


Code:
Private Sub cmdButton_Click()
 DoCmd.OpenQuery "qryname1"
 DoCmd.OpenQuery "qryname2"
 DoCmd.OpenQuery "qryname3"
 Form.Recalc
End Sub

et voila?

------------------------
Hit any User to continue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top