G
Guest
I have this problem whereby I can't link an autonumber field from a form to
another form having a number field. Currently I have coded the codes below
for a String expression but I'm not sure on how to execute on autonumber and
number. Anyone can help?
Private Sub Findings_Click()
Dim strOpenArgs As String
Dim strCriteria As String
Dim strFormName As String
On Error GoTo Proc_Error
strFormName = "Findings"
strCriteria = "[CR Number] = '" & Me![CR Number] & "'"
strOpenArgs = Me![CR Number]
DoCmd.OpenForm strFormName, WhereCondition:=strCriteria, OpenArgs:=strOpenArgs
Proc_Exit: Exit Sub
Proc_Error:
MsgBox "Error " & Err.Number & " in Findings_Click:" _
& vbCrLf & Err.Description
Resume Proc_Exit
End Sub
another form having a number field. Currently I have coded the codes below
for a String expression but I'm not sure on how to execute on autonumber and
number. Anyone can help?
Private Sub Findings_Click()
Dim strOpenArgs As String
Dim strCriteria As String
Dim strFormName As String
On Error GoTo Proc_Error
strFormName = "Findings"
strCriteria = "[CR Number] = '" & Me![CR Number] & "'"
strOpenArgs = Me![CR Number]
DoCmd.OpenForm strFormName, WhereCondition:=strCriteria, OpenArgs:=strOpenArgs
Proc_Exit: Exit Sub
Proc_Error:
MsgBox "Error " & Err.Number & " in Findings_Click:" _
& vbCrLf & Err.Description
Resume Proc_Exit
End Sub