Hi All,
I have a cmd button "Details" on a form listing all available records; how do I direct it to the selected record rather than just open a form?
Below is the code for Open the form I have so far. Thanks for the help!
maili
=============== =============== ==
Private Sub cmdDetails_Clic k()
On Error GoTo Err_cmdDetails_ Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PromosMainForm "
stLinkCriteria = "[PromoCode]=" & Me![PromoCode]
DoCmd.OpenForm stDocName, , stLinkCriteria
Exit_cmdDetails _Click:
Exit Sub
Err_cmdDetails_ Click:
MsgBox Err.Description
Resume Exit_cmdDetails _Click
End Sub
I have a cmd button "Details" on a form listing all available records; how do I direct it to the selected record rather than just open a form?
Below is the code for Open the form I have so far. Thanks for the help!
maili
=============== =============== ==
Private Sub cmdDetails_Clic k()
On Error GoTo Err_cmdDetails_ Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PromosMainForm "
stLinkCriteria = "[PromoCode]=" & Me![PromoCode]
DoCmd.OpenForm stDocName, , stLinkCriteria
Exit_cmdDetails _Click:
Exit Sub
Err_cmdDetails_ Click:
MsgBox Err.Description
Resume Exit_cmdDetails _Click
End Sub
Comment