When I try to pass OpenArgs to a form, I just get an error message telling me Variable Not Defined.
I must admit, I'm having a hard seeing the use of an OpenArgs property that can't be recognised, so I assume I'm doing something foolish.
I pass the OpenArgs with the following code:
argstring = "SELECT * FROM Index WHERE Index.CC_Page=" & userID & " AND Index.CC_Reject=7;"
DoCmd.OpenForm "the_indexer", acNormal, , , , , argstring
And then try to utilise it with the following:
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Forms!the_indexer.OpenArgs) Then
Me.RecordSource = Forms!the_indexer.OpenArgs
End If
End Sub
Anybody any ideas why this won't work? I think I'm going mad...
Any help very VERY appreciated. If it don't make you laugh, it ain't true.
I must admit, I'm having a hard seeing the use of an OpenArgs property that can't be recognised, so I assume I'm doing something foolish.
I pass the OpenArgs with the following code:
argstring = "SELECT * FROM Index WHERE Index.CC_Page=" & userID & " AND Index.CC_Reject=7;"
DoCmd.OpenForm "the_indexer", acNormal, , , , , argstring
And then try to utilise it with the following:
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Forms!the_indexer.OpenArgs) Then
Me.RecordSource = Forms!the_indexer.OpenArgs
End If
End Sub
Anybody any ideas why this won't work? I think I'm going mad...
Any help very VERY appreciated. If it don't make you laugh, it ain't true.