Hi,
Thanks for your previous message.
Do you have some code that could well illustrate your point.
It would be grately appreciated.
Many Thanks
----------------------------------
I will include code at a later date. But first I must make one point clear which I did not make clear last night. I apologize for any confusion I may have created.
The very important point that I did not include earlier is that I use two sets of identical tables. One set of tables are the actual data tables that will contain the stored data in a persistent manner. The second set of tables are temporary tables. When the users are entering data into a new record the data is stored in the temporary tables. The temporary tables are local on each computer. When the user clicks the commit button, and after the next order number is computed, a query appends the new record to the actual data tables. Then a second query deletes the temporary records. Only In this manner can all computers use the same Order number to begin with - which is then updated by the code as described earlier.
The form that is used for data entry has a dual purpose. The first use is to enter the new record into the temporary tables. The second use is to edit existing data in the actual data tables. When this form is opened, the form used to open it instructs it as to which mode is to be used by sending it "1", for the new record mode and "2" for the edit record mode, in the OpenArgs argument.
Example: DoCmd.OpenForm "Orders", , ,"1" ‘New record – (2 for editing records)
When the Orders form opens code in the forms open event checks its OpenArgs and then sets its Record Source to the appropriate set of records. Two queries are used. The first query uses the temporary tables as its underlying record source. The second query uses the actual data tables. The code to accomplish this is as follows:
If me.OpenArgs = "1” then
Me.RecordSource = "QueryTempOrders"
Else
Me.RecordSource = "QueryOrders"
End if
Well it is Thanksgiving and I’m scheduled to visit with my family so I will get back with you as soon as time allows.
May you and yours have a very Happy Thanksgiving!
Richard