M
meddoc
Guest
I have this code in one of my forms so as to open a new form with the records filtered according to the value of a textbox (Me!GPnumber).
Private Sub Command51_Click()
On Error GoTo Err_Command51_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PDFamil_frm"
stLinkCriteria = "[GPnumber] =" & Str(Me!GPnumber)
DoCmd.OpenForm stDocName, , , , stLinkCriteria
Exit_Command51_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
The problem is that when open, it is giving me an enter parameter value box asking for GPnumber value. As I have used this system before without any problems, I am realy lost at what could have been happening.
Any ideas? Thanks
Private Sub Command51_Click()
On Error GoTo Err_Command51_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PDFamil_frm"
stLinkCriteria = "[GPnumber] =" & Str(Me!GPnumber)
DoCmd.OpenForm stDocName, , , , stLinkCriteria
Exit_Command51_Click:
Exit Sub
Err_Command51_Click:
MsgBox Err.Description
Resume Exit_Command51_Click
End Sub
The problem is that when open, it is giving me an enter parameter value box asking for GPnumber value. As I have used this system before without any problems, I am realy lost at what could have been happening.
Any ideas? Thanks