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

Clearing a Field Using a Form Button 1

Status
Not open for further replies.

Yzerman777

IS-IT--Management
Jun 26, 2001
7
0
0
US
I am trying to use a button to copy the data in three fields to three separate fields in the same form, then clear out the original fields. I can copy the fields, but I am unfamiliar with the code to clear the fields. If anyone could help me out, it'd be greatly appreciated. Thank you, in advance.

Chris Wildes
 
You can use:
[tt]Me![ControlName]=Null[/tt]

Remember, the ControlName may be different from your field name.

For a text field, you must have the "Allow Zero Length" property set to Yes in the table design view.

Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
Side Question: Is there any way to move the cursor to a specific field?
 
Look up the setfocus method. Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
Me![ControlName].SetFocus Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top