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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filters and variables

Status
Not open for further replies.

K3ith

Technical User
Oct 26, 2001
16
0
0
US
Can anyone help

I am coding a filter, but first a bit of background, what I have is a table of information such as Car_reg, Owner_id.

When a user enters the database and wants to filter on all the car_reg relating to themselves, a filter is performed.

What I have is some code that gets the username from the pc through use of the advapi32.dll file and the result is shown in a text box named txtuser.

I have then got a button that filters car_regs relating to the Owner_id

I have put the value of the text box (owner_id) into a variable.
Then I am trying to include that variable in my filter.
I assume that my mistake lies in the following : Me.filter = “Owner_id” = mylist

Dim mylist As String
mylist = Me.txtuser.Value
Me.Filter = "owner_id” = mylist
Me.FilterOn = True


All help is appreciated

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top