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

Form - Edit, Updates when changing records

Status
Not open for further replies.

DummyForAccess

Technical User
Aug 7, 2002
38
0
0
US
I have a simple form built that is linked to one table. It is designed for the user to edit records in that table. I have a "process" button and a "find Record" button. Also the typical navigation buttons at the bottom, to scroll thru the records. Here's my horror: I've discovered that if someone is viewing a record, and clicks on one of the boxes or makes a change of any kind, AFTER THAT, if they scroll thru the records, or do a search for another record, it SAVES that change in the table. I'm not finding any kind of click event that would cause this.. I'm not overly familiar with access development in the first place... Help!!
 
That's the default behavior for bound forms.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
That's the default behavior for bound forms. That way you don't have to write any code.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Hi
If the controls on the form are bound controls ie they reference the fields in a table, changes will be saved automatically. You must stop saves, not command them in this case. If you change the properties of the form:
Allow Edits and
Allow Deletes
To No, it will prevent users changing the data. Alternatively, use unbound controls.
 
Here's another spin on this same topic.

(Sorry to barge in, but it's related).

I have a form that I want users to utilize to edit records. The form's recordsource is based on a query, Missing X without Y.

The form has the following fields.

LocationCode - control source: Locationfield in the missing x w/o y query
Address - unbound text box
Zip - unbound text box
State - unbound text box

I want users to be able to add the information in the form, scroll to the next record, do the same, until all the locations have been updated. It's at that point where I want the user to select a command button that saves and appends all the updated information to the source table.

*phew* make sense?

What's happening now is that when i edit record 1, the info from record 1 goes into the unbound text boxes for subsequent records.

Long story short, each record should be able to be updated with different info. Then save with a command button that appends new fields to the location table.

Thanks!

snoopy
 
Hi Snoopy
I'm not sure of the exact protocol here, but I think you need to post in a new thread, otherwise DummyForAccess will keep receiving notifications for your stuff, which may not be what s/he wants. :)
 
snoopy92211,
You can't update many records at a time from an unbound form (may be possible by some experts). You can use updation for each record's exit. See thread702-1030355 for something similar.

Zameer Abdulla
Visit Me (New Look & style)
 
I don't mind the slight subject change at all. Now I understand how the form works (doesn't mean I like it...). In response to your situation with wanting to hold data back and then append all at once, I'm not sure if this would work for you, but have you considered having your records append to a separate "temp" table, then when the user clicks on a certain button run an append query that would append all records from the temp table into your other table? (you might also want it to run a delete query to clear the temp table at that time...) Hope this helps.
 
Well, the issue is that I don't want to append anything to the tblmain unless all of the information is input by the user. Why? Because once the locationtable is updated, I will then run an update query and some append statements to add the info from tblmain to the imported table. If that makes sense.





 
Hi
A would an incomplete flag on tbl main work? Might be easier.
 
hmm...an incomplete flag? I've never heard of that. How do you do it?

 
Sorry, not well expressed. Add a flag to the table with a default value of 'No', when all data is entered set it to 'Yes' programmatically. Very quick and easy to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top