Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

May Lose Last Changes to Field

Status
Not open for further replies.

beckyh

Programmer
Apr 27, 2001
126
US
I have a form with a datasource of a query with 3 tables. This form also contains subforms. THe query of the main form and all the subforms contain the primry key of each corresponding table, or my subform is bound directly to the table.

The problem is a couple users will enter information in the main form, enter information in the first subform, the back to the main form. When back on the main form, there is a particualar field that will not save the changes. You can click Save Record without any errors, but when you scroll to a different record and then back to the record in question, it did not save changes to that field. Any ideas?? I have played with the Refresh settings, increasing the refreshes, without any luck.

Thanks!
 
ZmrAbdulla - I did visit your link. However, this just verifies what I know to be true. Like I mentioned above, I have tried manually saving the record before closing it, it does not help. The save appears to work correctly, but the data is not in fact saved.

Any other ideas I could try?
 
beckyh said:
there is a particualar field that will not save the changes
Are you sure the filed is not saving or the entire record is not being saved?
Did you check the table if the data is saved to the table and not been shown in the form? If the data is there it can be problem of linking subform with mainform
How the MainForm & SubForm related?
You are entering the data first to the subform and then to the main form. Is this not creating a problem? There is a chance of creating different relatedkey to the records


Zameer Abdulla
Visit Me
Where to pay your [purple]Tsunami[/purple] relief donations?
 
It is just the field that is not saving. The other parts of the record entered to that point are saved without problem. I have checked the table and it is not saved.

The mainform and subform are related by a key called CC#, which is just an autonumber.

Actually the order of data entry is mainform, then subform, then back to the mainform.

I would like to hear more about creating different keys....

Thanks!!
 
A few suggestions
[ul]
[li] Make sure that particular control is bound to table [/li]
[li] Access has a tendency of corrupting controls, objects and DB itself. So if the first one is OK try replacing the textbox to a new one. [/li]
[li] Make sure no other code is running to Undo the text changes of the field [/li]
[li] Make sure the data you are entering is correct format that you set to. (Text=Text or Number=Number) [/li]
[/ul]
About the RelatedKey
When you start entering a record in the main form a copy of the RelatedKey (eg: CustomerID in the Customer Table and CustomerID in the Sales table [ here it is AutoNumber CC#]) will be inserted in the subform.
For instance: You have entered a new record in the main form and later decided to change the customer. But you might have entered some value to the subform (incomplete). Then when you change the customer on the mainform the particular record in the subform will be entered to the table. This is because of lack of control side or table side data require declaration. You can't save the data if the required fields are not filled with data.
I don't think this will be your reason.

regards


Zameer Abdulla
Visit Me
Where to pay your [purple]Tsunami[/purple] relief donations?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top