D
Dion
I am trying to do a subform. From a previous post (thank
you), I have the following:
I created a form "SQL_Frm" - this is used for my subform.
In my main form, I created a subform (Name="MySubFrm",
Source Object="SQL_Frm"). In my main form I also have a
command button, with the following event:
Sub cmdFindRecords_Click()
Dim uSQL As String
uSQL = "SELECT * FROM Charges2 WHERE Doctor = 'RITJO';"
Forms!SQL_Frm.RecordSource = uSQL
Me!MySubFrm.SourceObject = ""
Me!MySubFrm.SourceObject = "SQL_Frm"
End Sub
But this doesn't work. Ultimately, my uSQL string will be
built from other combo boxes on the main form.
I don't know what I am missing - Help?
Thanks
Dion
you), I have the following:
I created a form "SQL_Frm" - this is used for my subform.
In my main form, I created a subform (Name="MySubFrm",
Source Object="SQL_Frm"). In my main form I also have a
command button, with the following event:
Sub cmdFindRecords_Click()
Dim uSQL As String
uSQL = "SELECT * FROM Charges2 WHERE Doctor = 'RITJO';"
Forms!SQL_Frm.RecordSource = uSQL
Me!MySubFrm.SourceObject = ""
Me!MySubFrm.SourceObject = "SQL_Frm"
End Sub
But this doesn't work. Ultimately, my uSQL string will be
built from other combo boxes on the main form.
I don't know what I am missing - Help?
Thanks
Dion