Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple filter problem

Status
Not open for further replies.

dominicg123

Technical User
Jan 5, 2007
23
CA
I have a combo box name FtlUser. I want to apply a filter with that combo box but I get a dialog box asking me for a parameter. Probably a simple mistake....

Private Sub FtlUser_AfterUpdate()

Me.Form.Filter = "[ActionFor]=" & Me!FtlUser

Me.FilterOn = True

End Sub
 
How are ya dominicg123 . . .

Perhaps your not selecting the right column! Use . . .
Code:
[blue]   Me.Form.Filter = "[ActionFor]=" & Me!FtlUser.Column([purple][b][i]x[/i][/b][/purple])[/blue]
Make note: [blue]Column Index[/blue] starts at zero and includes any fields set to zero (0) in the [blue]Column Widths[/blue] property . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
I only have one column to my combo box. I did add what you said but I still get this stupid parameter box with the title being the record that I choose in my combo box:

Private Sub FtlUser_AfterUpdate()
Dim cuser As String

cuser = Me.FtlUser.Column(0)
MsgBox cuser

Me.Form.Filter = "[ActionFor]=" & cuser
Me.FilterOn = True

End Sub
 
What about this ?
Code:
Me.Form.Filter = "ActionFor=[!]'[/!]" & Me!FtlUser [!]& "'"[/!]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top