Dgavilanes
Registered User.
- Local time
- Today, 01:56
- Joined
- Jun 25, 2001
- Messages
- 109
Hi All,
I have form A and form B, in form A I have two cascading combo boxes and a cmd button that once the criteria is selected it open form B in the correct record, however I copy the objects from A to B to eliminate two forms and just using one form, now when the criteria is selected, it will not open the correct record selected in the criteria.
Here is the code that was use in the cmd button in form A
Private Sub Cmd6_Click()
On Error GoTo Err_Cmd6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmIPSummary"
stLinkCriteria = "[Investment Plan Number]=" & "'" & Me![Investment Plan Number] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Cmd6_Click:
Exit Sub
Err_Cmd6_Click:
MsgBox Err.Description
Resume Exit_Cmd6_Click
End Sub
This code worked before moving it to the second form B
Any help would be greatly appreciated
Dennis
I have form A and form B, in form A I have two cascading combo boxes and a cmd button that once the criteria is selected it open form B in the correct record, however I copy the objects from A to B to eliminate two forms and just using one form, now when the criteria is selected, it will not open the correct record selected in the criteria.
Here is the code that was use in the cmd button in form A
Private Sub Cmd6_Click()
On Error GoTo Err_Cmd6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmIPSummary"
stLinkCriteria = "[Investment Plan Number]=" & "'" & Me![Investment Plan Number] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Cmd6_Click:
Exit Sub
Err_Cmd6_Click:
MsgBox Err.Description
Resume Exit_Cmd6_Click
End Sub
This code worked before moving it to the second form B
Any help would be greatly appreciated
Dennis