In the debug screen it tells me that Me.Combo60 = "25" instead of what
I want which is Me.Combo60 = "Joe Schmoe". 25 is Joe Schmoe's
corresponding ID field number in my 2 column table that provides the
list of field technician names. This solution feels very close except
that I need to get the value out of the second column.
Regards,
cclark wrote:
> Try placing Field Technician as part of the ComboMeal variable.
>
> ie.
>
> Dim ComboMeal As String
> ComboMeal = "[Field Technician] = " & Me.Combo60
>
>
> Me.Filter = ComboMeal
> Me.FilterOn = True
>
> cclark
>
>
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I am trying to use the value in a combo box to filter a form. However,
> > I have not been able to find the right syntax to make my code work
> > properly.
> >
> > Private Sub Combo60_AfterUpdate()
> >
> > Dim ComboMeal As String
> > ComboMeal = Me.Combo60
> >
> > Me.Filter = "[Field Technician] = ComboMeal"
> > Me.FilterOn = True
> >
> > End Sub
> >
> > How can I properly reference the ComboMeal variable within the
> > Me.Filter statement? Alternatively I could use the value directly from
> > Me.Combo60 but I have the same syntax or reference problem within the
> > confines of the Filter statement.
> >
> > Help is much appreciated!
> >
|