I am using the following code to open a form (frm_Audit) that contains a subform (frm_AuditDetails) from another form, frm_Search. This is the code in the On CLick event of a combo box in frm_Search.
Dim stDocName As String
Dim Whereclause As String
stDocName = "frm_Audit"
If Not IsNull(cbo_Status) Then
Whereclause = "Forms!frm_Audit!frm_AuditDetails.Form![Status] = '" & cbo_Status & "'"
End If
This only opens a blank form. If I substitute the frm_AuditDetails for stDocName and "[Status] = '" etc in the whereclause, the code works. Cam someone tell me what I am doing wrong?
Can someone tell me why this doesn't work?
Dim stDocName As String
Dim Whereclause As String
stDocName = "frm_Audit"
If Not IsNull(cbo_Status) Then
Whereclause = "Forms!frm_Audit!frm_AuditDetails.Form![Status] = '" & cbo_Status & "'"
End If
This only opens a blank form. If I substitute the frm_AuditDetails for stDocName and "[Status] = '" etc in the whereclause, the code works. Cam someone tell me what I am doing wrong?
Can someone tell me why this doesn't work?