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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping data available in data entry mode

Status
Not open for further replies.

JamesCanedo

Technical User
Oct 9, 2002
7
GB
I have a main customer form set to DataEntry as I want a certain group of users to enter customer information, but not see the whole customer database once entered or whilst entering.

The forms have a few additional forms linked by customerID. Some of these are opened from command buttons on the main form and others are subforms within the main customer form. I know as default, as soon as a form is closed, information is saved and disappears from view.

To make it easier for users I have added some save/cancel options. These operate in BeforeUpdate on the main Customer form, in OnClick for the command buttons opening linked forms, and in OnClick for a command button closing the main Customer form.

I am trying to keep the data in the main customer form available until it is closed.

To force a save without closing the form I have the following before the save code:

If Me.Dirty = True Then
Me.Dirty = False

This certainly keeps the data in the main customer form in view. However, I am not able to subsequently add any additional data or amend existing data already input. The fields are locked.

This also occurs if I tab through one of the subforms on the main customer form (even if no data is entered in one of these subform).

Could someone please provide some help on how I can get to a solution.

Thank you.

 
Hi!

Set up a table that has the same field structure as the permanent table. Allow the users to enter information into this table and bind the form to it. Don't set the form to data entry mode and they will be able to see all of their work, make adjustments including deletions. Put a button on the form to save the records after they are totally done. In the buttons click procedure you would run an append query to move the data to the permanent table and a delete query to erase information from the data entry table and close the form. If more that one user may be entering data at the same time, then you will need to add a field to the data entry table to identify who entered each record and only append and delete the correct records. You will also want to put some sort of check in the form close event to make sure the user has saved the records and, if they have not, to ask if they want to and then perform the appropriate tasks depending on the answer.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top