R
Ryan
I need to set a form that I have made's (Form1) Recordset
to one of five different queries based on certain
criteria. I do not know how to go about setting a form's
Recordset property in code though. My code so far looks
a little like this:
Dim stDocName As String
If action number 1 Then
stDocName = Query1
ElseIf action number2 Then
stDocName = Query2
ElseIf etc...
End If
Me.Recordset = stDocName
This does not work.
Through reading a little I can see that this is not the
proper way but I can't figure out to set a form's
recordset through code.
Can someone please help me out?
Ryan
to one of five different queries based on certain
criteria. I do not know how to go about setting a form's
Recordset property in code though. My code so far looks
a little like this:
Dim stDocName As String
If action number 1 Then
stDocName = Query1
ElseIf action number2 Then
stDocName = Query2
ElseIf etc...
End If
Me.Recordset = stDocName
This does not work.
Through reading a little I can see that this is not the
proper way but I can't figure out to set a form's
recordset through code.
Can someone please help me out?
Ryan