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!

Need To Delay Input of Bound Controls Until Event

Status
Not open for further replies.

txfink

MIS
Jan 28, 2004
18
US
So I have a form with controls (text boxes) bound to an access table. I need to have the user input the relevant data into each text box and then after entering all the data, a user initiated event triggers the data to save to the table. I don't want the table to be updated at all unless the user triggers the update.

I need help to do two things: (I think)
(1) stop the individual text boxes from updating the table
(2) signal the text boxes to update the table based on the user iniated event

Thanks in advance for any help. Let me know if any questions arise.

- SMF
 
You will probably need to use an unbound form and write back to the table when save is chosen.
 
What is the user intiated event? You can use the form's Before Update event to validate and stop it from updating but that depends on what you are trying to accomplish. A little more information might be helpful.

Bob Larson, Access MVP
 
Thanks guys for the responses so far.

The event I thought of was a button the user would click, but really it could be anything - doesn't necessarily have to be a button. The data being entered by the user will be in text format so it would be hard to validate it against any kind of input rule.

The reason I'd prefer not to use unbound forms is b/c I'm creating a bunch of forms updating different tables and I think creating unbound forms would be pretty time intensive. Keep in mind this is the first time in years I've done something like this, so if using unbound forms is the way to go, then it is what it is and I'll do it that way.

I really appreciate the help on this. Let me know if any other information would be helpful and I'll answer asap.

Thanks

- smf
 
As long as a user is on the one record, it will not update until either a command is used to save the record (either by code or manually) or if they move to another record.

I usually use the form's Before Update event to do all of my validation and if something isn't right I issue a

Cancel = True

and then the record isn't updated and the user is back where they were. I usually also give them an message box for them to choose whether they want to continue trying to add the record, but if not issue a

Me.Undo

to undo their changes.

Bob Larson, Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top