Urgent need of help with combo box saving

Nano

Registered User.
Local time
Today, 18:06
Joined
May 14, 2012
Messages
91
So I posted a question here about a debugging problem about a month ago with my database and never really got a solution. I am building a database very similar to a customer order database, except it also handles quotes for the company I work for.

My problem is on the form where I selecting the address for the customer in a combo box after already imputing the data in a previous form. The choice I make is not permanently saved in that record. The same problem happens when I select a shipping company, it does save the shipping company, however if I open or change another record then the first also changes.

For more information please look at this thread: http://www.access-programmers.co.uk/forums/showthread.php?t=229752

You can download a copy of the database on that thread.

I would really appreciate any help, solving this problem might save me from having my project canceled.
 
What combo box is it exactly? Or what should I do to replicate the problem?
 
What combo box is it exactly? Or what should I do to replicate the problem?

Like I said above you can download a copy of my database from the thread above.

If you open my database and go to "F_Quote" You will see a drop down box with the shipping address. The best example would be for record 4, it should be "Jill, Jack" when selecting a address it gives you the address list for customer "Doe, John" If you select the customer name again the address list updates correctly showing "123 Hill Way..." however if you save (or it is suppost to save on update anyway) and close the form, then reopen the box is blank again.
 
I see what you mean. In the Form's Current event, put this line of code:
Code:
Me.ShippingInfoCombo.Requery
 
I see what you mean. In the Form's Current event, put this line of code:
Code:
Me.ShippingInfoCombo.Requery


Yes That worked perfectly, Thank you so much! I have a similar problem with the shipping company in the "F_Confirm_Ship_Info" form open a record in the quote form then open the "F_Confirm_Ship_Info". Do you have a code I can use to save that combo box as well?
 
The Shipping Company combo box? Use the same code but replace the combo box name with the appropriate one.
 
Thanks again! Yeah I just tried that. I can't thank you enough. :D
 
I have been searching for an answer to this exact problem for a number of hours and you have solved it. So thank-you!

That said, I don't understand why this fixes the problem. Sorry if there is an obvious answer, but I just don't get why re-querying the combo box would result in the data being saved. Any chance you could elaborate for me?

Jenn
 
By having that criteria in the Row Source of your combo box you are altering the number and type of results returned and the first time the form loads, it gets filtered once. After that, it remains with those filtered records. So you need a Requery to fetch new result sets. Makes sense?
 
I think I've got it. Thanks again. I'm very glad to have this one hurdle mounted!
 

Users who are viewing this thread

Back
Top Bottom