G
Guest
Dear Sirs
Herewith I would like to specify my yesterdays question.
I have a customer form with a command button "open offer form". I would like
that the offer form which opens, only shows the records from from the
specific customer. This I would like to archive with the "event on click"
method. I have the following VB code:
Private Sub Command96_Click()
On Error GoTo Err_Command96_Click
Dim stDocname As String
Dim stLinkCriteria As String
stLinkCriteria = "[clientID]=" & "'" & [Forms]![customers]![clientID] &
"'"
stDocName = "offer"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command96_Click:
Exit Sub
Err_Command96_Click:
MsgBox Err.Description
Resume Exit_Command96_Click
End Sub
I'll get the following error message:
"The OpenForm action was cancelled".
Can someone tell me how to alter the code so that it is working?
Thanks
Klaus
P.S. Sorry that I specified a yesterday placed question, but I thought the
other thread is already too confusing
Herewith I would like to specify my yesterdays question.
I have a customer form with a command button "open offer form". I would like
that the offer form which opens, only shows the records from from the
specific customer. This I would like to archive with the "event on click"
method. I have the following VB code:
Private Sub Command96_Click()
On Error GoTo Err_Command96_Click
Dim stDocname As String
Dim stLinkCriteria As String
stLinkCriteria = "[clientID]=" & "'" & [Forms]![customers]![clientID] &
"'"
stDocName = "offer"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command96_Click:
Exit Sub
Err_Command96_Click:
MsgBox Err.Description
Resume Exit_Command96_Click
End Sub
I'll get the following error message:
"The OpenForm action was cancelled".
Can someone tell me how to alter the code so that it is working?
Thanks
Klaus
P.S. Sorry that I specified a yesterday placed question, but I thought the
other thread is already too confusing