Clear the contents of a field when form is opened (Access 2003)

  • Thread starter Jerry in the Desert.
  • Start date
J

Jerry in the Desert.

Hello all,

I have an application that when a user double clicks on a record in a search
form, a new form is opend read only (acFormReadOnly). If a user wants to
edit the record, I have a commend button which opens another version of the
form and closes the read only version. When this new (editable) form is
opened, I want to clear the contents of two fields (memo fields). Can some
tell me how to do this?

Thanks
 
J

John W. Vinson

Hello all,

I have an application that when a user double clicks on a record in a search
form, a new form is opend read only (acFormReadOnly). If a user wants to
edit the record, I have a commend button which opens another version of the
form and closes the read only version. When this new (editable) form is
opened, I want to clear the contents of two fields (memo fields). Can some
tell me how to do this?

Thanks

Do you want to erase any existing memo content in the existing table!? Why?
What if the user accidently opens the wrong record: do you want the two fields
permanently and irrevokably erased?


John W. Vinson [MVP]
 
C

Carl Rapson

Jerry in the Desert. said:
Hello all,

I have an application that when a user double clicks on a record in a
search
form, a new form is opend read only (acFormReadOnly). If a user wants to
edit the record, I have a commend button which opens another version of
the
form and closes the read only version. When this new (editable) form is
opened, I want to clear the contents of two fields (memo fields). Can
some
tell me how to do this?

Thanks

You should be able to do that in the form's Load event:

Me.txtMemo1 = Null

Carl Rapson
 
J

Jerry in the Desert.

When you open the form in read only mode, you click an "Edit" command button
which writes the current data to a history file.
Thanks,
 
J

Jerry in the Desert.

That did it. Thanks for the help.

Jerry

Carl Rapson said:
You should be able to do that in the form's Load event:

Me.txtMemo1 = Null

Carl Rapson
 
Top