Editting fields in a form

J

Jenny

I am creating a form where i want to bring up fields and make changes to
them. Then I want to press on a save button and have the changes saved into
the access table. How do I do that?!
 
L

Larry Linson

Jenny said:
I am creating a form where i want to bring
up fields and make changes to them. Then
I want to press on a save button and have
the changes saved into the access table.
How do I do that?!

Visit Office Online, http://office.microsoft.com, and take a look at the
Access online training. Or, buy a simple self-study, such as Microsoft
Access Step by Step, read it, and do the exercises.

If you put the name of a Table or Query in the RecordSource property of a
Form, and the name of Fields in the Control Source of Controls (e.g., Text
Boxes, Combo Boxes, etc.) on the Form, changes to those Fields will
automatically be updated when you (1) move off that Record to another
Record, (2) move the focus to a Subform Control on the Form, or (3) Close
the Form.

If you want the user to choose whether to save, in the Form's Before Update
event, ask the User if they want to Save, and, if they choose No, then set
the Cancel argument of the BeforeUpdate event's Sub Procedure to True before
exiting. That is, rather than the user explicitly Saving, the usual approach
is to allow them to disallow the Save.

Larry Linson
Microsoft Access MVP
 
J

John W. Vinson

I am creating a form where i want to bring up fields and make changes to
them. Then I want to press on a save button and have the changes saved into
the access table. How do I do that?!

No code, no button, nothing special is needed. Just use the Table - or,
better, a Query sorting the table in some logical order - as the source for
the form, and that's just what it will do. When you close the form or move off
the record it saves automatically.

John W. Vinson [MVP]
 
J

Jenny

Thank you for your help. I didn't realise it was that easy.

I want to prompt the user if they want to save the changes they made to
multiple controls. I want this to happen through a button. In other words,
when the user edits controls and then presses on a button that says 'Save' I
want to prompt then. How do I promp 'To save or not to save' through a
button? I want to do this without using code i.e. using queries and macros
only. Please let me know if that's possible.
 
Top