data save

K

kevin carter

hi

i have created a form to accept data from a user
when the user saves te data i would like the fields to become and remain
blank
at present the fields are showing the data

Is there any way of making the fields blank after the data saved?


Thanks for your help and time


Kevin
 
H

Howard Brody

Is your form bound to the table you're updating?

If so, the changes you make are live (you don't need to
save for them to take effect) and if you clear the
controls you will be clearing a record . . . unless you
use code or a macro to go to a new record - which will
give you blank controls (unless there is a default value
for the field(s)).

In a Macro:
Action: GoToRecord
ObjectType: Form
ObjectName: frmFormName
Record: New

In Code:
DoCmd.GoToRecord acDataForm, "frmFormName", acNewRec


If the form is not bound to the table, use the same
process (code or macro) to clear the controls after
updating the table.

In a Macro:
Action: SetValue
Item: [Forms]![frmFormName]![ControlName]
Expression: ""

In Code:
[ControlName] = ""

Hope this helps!

Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top