Combobox works but is not linking to subform

mariaanthony50

Registered User.
Local time
Today, 13:16
Joined
Feb 16, 2017
Messages
38
I have a basic database with several tables. I can get all but 3 of the combo boxes to filter data to the subform and I can't get these last 3 to work.

I tried to attach my database but it wouldn't work. This is my first post on any board so excuse me if I am doing this wrong!

The combo boxes that are not working are cboStaff, cboCategory, cboProblem. They pull the data from the table and show up in the drop down but when I select a choice from the combo box it is not filtering the subform list my other combo boxes are.



I am a new user to Access and little out of my league!
I appreciate any help you can provide.
 
The problem is you hide the first column which contain a number/index, but you want the text so it is in the second column.
Here is the corrected line for the problem field.
Code:
myProblem = "Select * from problem_record where ((problem) = '" & Me.cboProblem[B][COLOR=Red].Column(1) [/COLOR][/B]& "')"
 
Thank you !!!! that worked to fix my Problem and Category combo boxes. I tried to use the same logic to fix the cboStaff but it didn't work. I think the problem might be with my Row Source for this one. The cboStaff has been driving me crazy for days!!! I know it's something simple.

Also, the drop down and filtering is now working on cboCategory but it is missing one record with a category of PWS/SOP. I changed the entry to be PWS or SOP thinking that the / has something to do with it missing this one record but that didn't work.
 
Ok. So I have been playing around with the statement you provided and I got the cboStaff to display the list of employees so that part works. But when I select a Staff from the list their corresponding record shows up on the subform filter but their name does not show in the subform field Contract Staff.

So it is somehow making the connection to the table but I 'm not quite there.
 
Also, the drop down and filtering is now working on cboCategory but it is missing one record with a category of PWS/SOP....
In the table you've the value "PWS/SOP" but in the combobox you've the value "PWS/SOW"
The control "Contract Staff" in the subform is unbound!
 
I fixed those two issues but the drop down box is showing the correct listing but it is still not filtering on the subform.
 
Post your database again, so I can see what you change.
And which combobox is showing the correct listing but it is still not filtering on the subform?
 
JHB
Sorry for the delay. Had a long holiday weekend.
Here is my latest database. The only drop down that is not working is Contract_Staff.
 

Attachments

Users who are viewing this thread

Back
Top Bottom