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!

[color red]DOCMD.GOTORECORD updates current data....

Status
Not open for further replies.

regava

Programmer
May 24, 2001
152
US
I have a filtered form which may have more than one record to display. When in record 1 (or any record) and a change is made in one of the fields by mistake, and, either the NAVIGATION BUTTON is clicked, or a command is issue to goto the next record (DoCmd.gotonext) the information entered by mistake is saved in the dataset. Is there any way to prevent this from taking place? The search for the right record is made because some information need to be added or changed.
HELP is appreciated. Thank you.
Regava
 
How do you expect Access to know what is changed in error or what command is given in error as oppose to on purpose?

However here are some general ways of error proofing data entry:

1. make any fields that automatically fill and won't change disabled with the fields enable (yes/no) property.
2. You can make as many combo boxes with drop down lists as you can and set the "limit to list" property in the table.
3. set a msgbox warning to pop up when data is changed on your fields before update event like this:

msgbox(here the context help will pop up in the code window)
Kimberly Palazzi
kpal29@hotmail.com
 
You can put a message box on the BeforeUpdate event of this form, to ask the user if they meant to edit the record. This will slow down users who are trying to make valid changes, but the trade off may be worth it.

As another option - you may want to look at setting the focus onto another control after the filter is applied. If the problem is that users are accidentally typing into the first field without realizing it, you may want to set the focus to a field that doesn't have critical data (make a dummy one if you want). That way, if they're typing with their heads down, they won't do any damage to critical info.

These are quick fixes, I hope they give you some ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top