sync combo boxes

kisskrisz

New member
Local time
Today, 18:25
Joined
Jul 20, 2009
Messages
7
Dear All! I know that this has been asked several times on forum, but I have issues with synchronizing 2 combo boxes. I read through the whole forum and searched on web. I went through several templates, used the built in sync combo box sample in Access 2007...without success :(

I am just learning access and I am very disappointed I could not solve such an easy task...believe me, I tried everything.

Attached you can find my database..what I want is on Service form when I make a selection in Customer ID field, than in Product ID field only the related Product IDs are listed. Nothing else!

I would really really appreciate any help!!

thanks a lot in advance!
 

Attachments

Believe me, I've tried it!
I know that I am the stupid guy here who is not able to solve such an easy thing...:confused::(

But even if I try to add this code to my database and update everything correctly, when I select the CustomerID, something goes wrong... and I spent hours with only this small little thing

Could you or someone check my MDB attached ? maybe there is a general problem I am not aware of ... most probably the solution takes only couple of minutes for you guys

Again, any help is greatly appreciated in advance!!!
 
One more thing... in above example on BaldyWeb data are in the same table

In my Database, data are in different tables: Customer and Product
And where form is pointing to a 3rd table: Service

If case would be only to have 2 data in same table, I think it would be easy to solve..even for me

But I am totally lost with my database regarding sync these 2 combo boxes
 
Private Sub CustomerID_AfterUpdate()
Dim strSource As String

strSource = "SELECT ProductID " & _
"FROM Product " & _
"WHERE CustomerID = '" & Me.CustomerID & "' ORDER BY ProductID"
Me.CustomerID.RowSource = strSource
Me.CustomerID = vbNullString
End Sub
=======================================
that was your code on your form. have you taken note of your me.customerid.rowsource if it should be me.productid.rowsource?

I also notice that your customerid and productid field are unbound? was that intentional?
 
regarding .rowsource...the answer is no..not recognized it.
After spending almost 4 hours renaming, changing, testing this I lost my mind

the reason why the fields are unbound is the following:
http://msdn.microsoft.com/en-us/library/bb404901.aspx

in the example what I was trying the fileds are unbound

maybe this is where I got lost

thanks again for your help!!!!!
 
Thank you!!!!!

It works as I wanted. I also tired with other form elements and I can produce the same result with other forms / combo boxes.


Again, thank you very very much for your help!!!!;)
Greatly appreciated!!:D
 

Users who are viewing this thread

Back
Top Bottom