Updating a Table on Form Exit

xcaliber

New member
Local time
Today, 17:00
Joined
Feb 23, 2002
Messages
7
I have a list box which lists the Record belonging to a customer. So, Customer 1, has 5 Unique sales, (Tables looks Like CustID (pk), SaleID (pk), Sales Data ). When clicked on the list box a set of Text Boxes below fill in with that rows Sales Data. You can edit and save all the information and I have it requery the list box. Everything works fine.
When I leave the Form it updates the first record belonging to the customer (eg CustID =5 SalesID = 34) with the Sales Data from the recordset I just updated.
I can not seem to stop it from updating that first record.

Can someone give me some insight.

sean
 
Sorry, sean. I get the feeling no one has answered because it sounds like your data is not normalized or you are using a form when you should be using a subform. Or something.

I would be willing to take a *quick* look at your database if you like. Remember to compact before emailing.

~Dreamboat~
TheWordExpert
 
Sean, did u manage to get to the bottom of this? I've just realized that my query under 'forms behaving badly' is the same as this. Mine is a simple form that displays order info and it updates the whole recordset available to the comboboxes with CustomerId of the last record displayed and it is driving me crazy.
Farrah
 
Yes I did get to the bottom of it.

As usual once you see the solution you wonder why you did not notice earlier.

My Textboxes had a control source set to the table. I realized I was setting values to them during run time. ( much like your combo boxes) I made the text boxes unbound and presto. It works like a charm.

I figured this out late last night so I did not have the energy to come here and update things.

I hope that helps farrah.

sean
 
Thanks Sean, u saved my day....the funny thing is that I have used unbound forms all along and done sql queries to get info on screen, but with this one it was as if I had no clue and made it into an unbound form. Wasted one whole day...thanks for your help.
Farrah
 

Users who are viewing this thread

Back
Top Bottom