L
lizcraw
Guest
I have a form with a button that opens a second form, this works fine until I drag it into a third form. (button on a subform)
Now when I use the button an Enter Parameter Value box appears. "Forms!Contacts!ContactID"
I haven't changed the code in the event proceedure, because it still works when it's not in the subform. This is what I have now:
Private Sub Events____Click()
On Error GoTo Err_Events____Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Calls"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Events____Click:
Exit Sub
Err_Events____Click:
MsgBox Err.Description
Resume Exit_Events____Click
End Sub
I am at a loss, any ideas???
Thanks
Now when I use the button an Enter Parameter Value box appears. "Forms!Contacts!ContactID"
I haven't changed the code in the event proceedure, because it still works when it's not in the subform. This is what I have now:
Private Sub Events____Click()
On Error GoTo Err_Events____Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Calls"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Events____Click:
Exit Sub
Err_Events____Click:
MsgBox Err.Description
Resume Exit_Events____Click
End Sub
I am at a loss, any ideas???
Thanks