by Salad <oil@[EMAIL PROTECTED]
>
May 12, 2008 at 02:52 PM
gmazza via AccessMonster.com wrote:
> Hi there,
> I am a novice at Access programming but I am flustered by this error and
> don't understand what I am doing wrong, any help is appreciated.
> Here is my code:
> Sub SetFilter()
>
> Dim LSQL As String
>
> LSQL = "select * from dbo_DDXLMO"
> LSQL = LSQL & " where St_Offshore = '" & cboSelected & "'"
>
> Form_frm_OffsetWells_sub.RecordSource = LSQL
>
> End Sub
>
> I am calling the SetFilter routine from my Form_Open Procedure and all I
have
> is a form and subform and in the form I have an unbound combo box that
> selects St_Offshore from table dbo_DDXLMO.
> I am just trying to populate the subform with results from my combo box
and I
> keep getting this error and I have tried a million things and nothing is
> working.
> Please help, thanks!
>
You might want to try the following format
Forms!MainFormName!SubFormName.Form.Recordsource = ...
or
Me("SubFormName").Form.Recordsource = ...
Brass
http://www.youtube.com/watch?v=1qdvz0uPpNk