Man, combo boxes can be really tricky. What I want to do is not quite "cascading"--I've checked out previous posts in that area. Here's the challenge, which I'm sure many of you have already faced:
Using a form based, for example, on Northwind's Customers table, you want to place two combo boxes on the form. One is connected with Customers.CompanyName the other with Customers.ContactName.
When you open the either combo you see ALL the 91 records in the customers table. We aren't looking to use one combo to display a subset of records based on a selection in the other. Instead, one can use either combo to select the record you want to edit.
I real life you might want one combo to show Customers by state, city and name. The other might show them just by name. If you use combo "A" to select a record, combo "B" needs to be refreshed so it doesn't confuse the user by showing field(s) from some previous record. I.e. each needs to refresh/requery the other.
When I try to get this to work, there's some missing piece of the puzzle that prevents each combo from being able to select a record to work on, some binding issue with controlsources, boundcolumns and the form's recordsource that I'm missing.
I figured that each combo could be unbound and in the OnChange method I could put some code to Seek the selected record and then refresh the form. So far I haven't been able to get that to work.
I have tried creating a query for the form and using it as the recordsource for each combo. Still nogo.
If it were my native language (MS Vis FoxPro) I could have done this in my sleep, but in Access I have not yet hit the right method. I hope that in a minute or two one of you folks could save me hours!
Using a form based, for example, on Northwind's Customers table, you want to place two combo boxes on the form. One is connected with Customers.CompanyName the other with Customers.ContactName.
When you open the either combo you see ALL the 91 records in the customers table. We aren't looking to use one combo to display a subset of records based on a selection in the other. Instead, one can use either combo to select the record you want to edit.
I real life you might want one combo to show Customers by state, city and name. The other might show them just by name. If you use combo "A" to select a record, combo "B" needs to be refreshed so it doesn't confuse the user by showing field(s) from some previous record. I.e. each needs to refresh/requery the other.
When I try to get this to work, there's some missing piece of the puzzle that prevents each combo from being able to select a record to work on, some binding issue with controlsources, boundcolumns and the form's recordsource that I'm missing.
I figured that each combo could be unbound and in the OnChange method I could put some code to Seek the selected record and then refresh the form. So far I haven't been able to get that to work.
I have tried creating a query for the form and using it as the recordsource for each combo. Still nogo.
If it were my native language (MS Vis FoxPro) I could have done this in my sleep, but in Access I have not yet hit the right method. I hope that in a minute or two one of you folks could save me hours!