Your very close.
StrTemp = Combo8.Text should be StrTemp = Me.Combo8

Signature
Please remember to mark this post as answered if this solves your problem.
> I am using the code below to filter a form from an combo box. However all I
> am getting is all records filtered out or null return.
[quoted text clipped - 14 lines]
> Stop
> End Sub
Ryan Thanks,
StrTemp is = to the Content of Combo8 (changed to Me.combo8)
But when it goes to the next line of code
DoCmd.ApplyFilter , "Field1 = StrTemp"
StrTemp = null and seems to loose its value from Me.Combo8
I even change the code to read this
DoCmd.ApplyFilter , "Field1 = Me.Combo8" but still get no records returned.
> Your very close.
> StrTemp = Combo8.Text should be StrTemp = Me.Combo8
[quoted text clipped - 17 lines]
> > Stop
> > End Sub
AJOLSON - 31 Jul 2008 17:12 GMT
Ok after a little trouble shooting what I can see is that in this code
DoCmd.ApplyFilter , "Field1 = StrTemp"
the StrTemp keeps its value of the combo box Does not pass it to Field1 to
filter on.
Field one in that code remains Null.
That seems to be the issue.
> Ryan Thanks,
> StrTemp is = to the Content of Combo8 (changed to Me.combo8)
[quoted text clipped - 25 lines]
> > > Stop
> > > End Sub
Golfinray - 31 Jul 2008 17:12 GMT
Try using the standard old filter:
Me.filter = "[your field name] = """ & me.combo8 & """"
Me.filteron = true
> Ryan Thanks,
> StrTemp is = to the Content of Combo8 (changed to Me.combo8)
[quoted text clipped - 25 lines]
> > > Stop
> > > End Sub
AJOLSON - 31 Jul 2008 17:17 GMT
Hurray Success!!! Thanks Golfinray!!!
Ok one last thing I can’t find any code for a command button that would
clear the filter. Does anyone know of one and if so please pass it on.
Again thanks all
Andy
> Try using the standard old filter:
> Me.filter = "[your field name] = """ & me.combo8 & """"
[quoted text clipped - 29 lines]
> > > > Stop
> > > > End Sub
Ryan - 31 Jul 2008 17:19 GMT
Try this
Private Sub Command6_Click()
Dim StrTemp As String
DoCmd.ApplyFilter , "Field1 = " & StrTemp
.FilterOn = True
End Sub

Signature
Please remember to mark this post as answered if this solves your problem.
> Ryan Thanks,
> StrTemp is = to the Content of Combo8 (changed to Me.combo8)
[quoted text clipped - 25 lines]
> > > Stop
> > > End Sub