I
Irene
i have a form which have a button to call open a form. but it will have a st
LinkCriteria which is in text form. my code is like that:
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "f_material_out_main"
stLinkCriteria = "[matl_code]=" & "'" & Me![matl_code] & "'" And
"[DO_no]=" & "'" & Me![DO_no] & "'"
'stLinkCriteria1 = "[matl_code]=" & "'" & Me![matl_code] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command21_Click:
Exit Sub
Err_Command21_Click:
MsgBox Err.Description
Resume Exit_Command21_Click
End Sub
can somebody help me to modify? cos when i click the button, it was coming
out an error "type mismatch". where should i change?
thanks for help!
LinkCriteria which is in text form. my code is like that:
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "f_material_out_main"
stLinkCriteria = "[matl_code]=" & "'" & Me![matl_code] & "'" And
"[DO_no]=" & "'" & Me![DO_no] & "'"
'stLinkCriteria1 = "[matl_code]=" & "'" & Me![matl_code] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command21_Click:
Exit Sub
Err_Command21_Click:
MsgBox Err.Description
Resume Exit_Command21_Click
End Sub
can somebody help me to modify? cos when i click the button, it was coming
out an error "type mismatch". where should i change?
thanks for help!