iankerry
Registered User.
- Local time
- Today, 20:32
- Joined
- Aug 10, 2005
- Messages
- 190
hi
i have searched the forum to find a solution as i cant be the only one foxed by this - unless i really am dull!
i have a form, and a sub form. on the sub form i have a command button that i want to use to open up a specific record on the subform.
in this case i am on a venues form, and in the subform there may be 2-3 promoters who do things at that venue. the command button should launch the promoters form to that persons record.
so behind the command buton i have:
Private Sub Command7_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "promoters"
stLinkCriteria = "[PromoterID] = " & Me![PromoterID]
DoCmd.OpenForm stDocName, , stLinkCriteria
End Sub
when i run it, despite lots of trials with different syntax i get error 3011... could not find the object '[promoterid]=16'
yes on the subform and on the promoters form i wish to launch there is the field [promoterID].
what am i doing wrong!!!!
thanks
ian
i have searched the forum to find a solution as i cant be the only one foxed by this - unless i really am dull!
i have a form, and a sub form. on the sub form i have a command button that i want to use to open up a specific record on the subform.
in this case i am on a venues form, and in the subform there may be 2-3 promoters who do things at that venue. the command button should launch the promoters form to that persons record.
so behind the command buton i have:
Private Sub Command7_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "promoters"
stLinkCriteria = "[PromoterID] = " & Me![PromoterID]
DoCmd.OpenForm stDocName, , stLinkCriteria
End Sub
when i run it, despite lots of trials with different syntax i get error 3011... could not find the object '[promoterid]=16'
yes on the subform and on the promoters form i wish to launch there is the field [promoterID].
what am i doing wrong!!!!
thanks
ian