> Depending on how you added frm Options as a subform, the name of the subform
> control on frm MainMenu may be named something different than frm Options.
> Double-check to ensure that you're using the name of the subform control.
>
> Once you're sure that you are using the correct name, it needs to be .Form,
> not !Form. Form is a property of the subform control, and you always refer
> to properties using periods, not exclamation points.
>
> And at the risk of annoying you, I don't agree that frm MainMenu and frm
> Options are any easier to read than frmMainMenu and frmOption.
>
> --
> Doug Steele, Microsoft Access MVP
>
http://I.Am/DougSteele> (no e-mails, please!)
>
>
> "Michael Conroy" <MichaelConroy[ at ]discussions.microsoft.com> wrote in message
> news:0DC8B1C6-659B-44BB-95EC-7CA8E28E7165[ at ]microsoft.com...
> >I need to clearify whether or not my form naming convention is preventing
> >my
> > code from running. The main form is named "frm MainMenu" and the subform
> > is
> > "frm Options", and yes there is a space after the m, it makes it easier
> > for
> > me to read it.
> >
> > Now on my main form in the afterupdate event of the "WorkOptions" option
> > box
> > I am grabbing the value and trying to change the recordsource of the sub
> > form. The code errors out saying it can't find the FIELD "frm Options",
> > when
> > I expect it to be looking for a form. (Error 2465) I thought the square
> > brackets made it look like a field, but what else can you wrap around a
> > form
> > name to cover spaces? The A97 code looks like this:
> >
> > Dim Criteria As String
> > Dim strSQL As String
> > Dim Target As Byte
> > Target = Me.WorkOption
> > Criteria = "Category = " & Target
> > strSQL = "SELECT [tbl Options].* " & _
> > "FROM [tbl Options] " & _
> > "WHERE (" & Criteria & ");"
> > Me![frm Options]!Form.RecordSource = strSQL
> >
> > As always and help will be greatly appreciated. Thanks
> > --
> > Michael Conroy
> > Stamford, CT
>
>
>