Mrs.Meeker
Registered User.
- Local time
- Today, 10:10
- Joined
- Mar 28, 2003
- Messages
- 172
I have 5 append queries that I want to run from the push of a single command button but I don't know how to string together the code. I was instructed to build a button to run one query and then copy the code down 4 times and rename each one according to the querie names.
Currently the queries feed information into a table but I will eventually be adding another form that I will want to use the same button to open to be used as a questionaire.
Thanks
Rhonda
here's an example, can you tell me how much of the 2nd code to remove to combine it with the first and make it one?
Private Sub CmdNext_Click()
On Error GoTo Err_CmdNext_Click
Dim stDocName As String
stDocName = "qryAbutmentType"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_CmdNext_Click:
Exit Sub
Err_CmdNext_Click:
MsgBox Err.Description
Resume Exit_CmdNext_Click
End Sub
Private Sub CmdNext_Click()
On Error GoTo Err_CmdNext_Click
Dim stDocName As String
stDocName = "qryPierType"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_CmdNext_Click:
Exit Sub
Err_CmdNext_Click:
MsgBox Err.Description
Resume Exit_CmdNext_Click
End Sub
Currently the queries feed information into a table but I will eventually be adding another form that I will want to use the same button to open to be used as a questionaire.
Thanks
Rhonda
here's an example, can you tell me how much of the 2nd code to remove to combine it with the first and make it one?
Private Sub CmdNext_Click()
On Error GoTo Err_CmdNext_Click
Dim stDocName As String
stDocName = "qryAbutmentType"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_CmdNext_Click:
Exit Sub
Err_CmdNext_Click:
MsgBox Err.Description
Resume Exit_CmdNext_Click
End Sub
Private Sub CmdNext_Click()
On Error GoTo Err_CmdNext_Click
Dim stDocName As String
stDocName = "qryPierType"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_CmdNext_Click:
Exit Sub
Err_CmdNext_Click:
MsgBox Err.Description
Resume Exit_CmdNext_Click
End Sub