Enter Parameter Value in syncronised combo box???

scrappy2

New member
Local time
Today, 21:11
Joined
Dec 12, 2008
Messages
4
Hi, im tryin to build a form which uses 2 combo boxes, the first one pulls details of user names from a table without any problem however when i use the after update method to pull a field from another table using the data in the first combo i get a pop up which says enter parameter value, if i enter a value in nothing happens. Ive checked the code for the after update when its called and the SQL query is fine, ive followed the steps in other examples and i know the code should work but cannot figure out why this box is popping up.

1st combo - Categories
2nd combo - Products

here is an example of the RowSource info for the 2nd combo - SELECT Application FROM ProjectList WHERE AssignedTo = ck78668 ORDER BY Application

here is the VB code for the 1st combo

Private Sub Categories_AfterUpdate()
Me.Products.RowSource = "SELECT Application FROM" & _
" ProjectList WHERE AssignedTo = " & _
Me.Categories & _
" ORDER BY Application"

Me.Products = Me.Products.ItemData(0)
End Sub

Can someone please help, this is wrecking my brain why it doesnt work properly??
 
Straightaway the word Application jumped out at me - this is most likely a reserved word so I would be strongly tempted to change it.

Also you need to encompass the criteria in quotes



should be

Me.Products.RowSource = "SELECT Application FROM ProjectList WHERE AssignedTo = '" & Me.Categories & "' ORDER BY Application"
 

Users who are viewing this thread

Back
Top Bottom