Mrs.Meeker
Registered User.
- Local time
- Today, 13:05
- Joined
- Mar 28, 2003
- Messages
- 172
I have a series of forms that open on click of various buttons. On frmProjectMasterDetail there are two buttons "QC" and "QA", when either of these buttons open a new form opens: frmUser2 which displays the survey type either "QC" or "QA". My problem starts when you click the "Next" button. Only the "QC" survey opens because I can't figure out how to include the two choices.
Here's the code that I have.
Private Sub cmdNextStepGen_Click()
On Error GoTo Err_cmdNextStepGen_Click
DoCmd.SetWarnings False
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
stDocName = "qryGenerateQC"
DoCmd.OpenQuery stDocName, acNormal, acEdit
stDocName = "frmSurveyQCHeader"
stLinkCriteria = "[tbluser2.SurveyNumber]=" & Me![SurveyNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmuser2"
DoCmd.Close acForm, "frmprojectMasterdetail"
Exit_cmdNextStepGen_Click:
Exit Sub
Err_cmdNextStepGen_Click:
MsgBox Err.Description
Resume Exit_cmdNextStepGen_Click
End Sub
The other survey has the same name with QA substituted for QC.
thanks, I'm lost!
Rhonda
Here's the code that I have.
Private Sub cmdNextStepGen_Click()
On Error GoTo Err_cmdNextStepGen_Click
DoCmd.SetWarnings False
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
stDocName = "qryGenerateQC"
DoCmd.OpenQuery stDocName, acNormal, acEdit
stDocName = "frmSurveyQCHeader"
stLinkCriteria = "[tbluser2.SurveyNumber]=" & Me![SurveyNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmuser2"
DoCmd.Close acForm, "frmprojectMasterdetail"
Exit_cmdNextStepGen_Click:
Exit Sub
Err_cmdNextStepGen_Click:
MsgBox Err.Description
Resume Exit_cmdNextStepGen_Click
End Sub
The other survey has the same name with QA substituted for QC.
thanks, I'm lost!
Rhonda