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

How do we clear out a field?

Status
Not open for further replies.

erictheman

Programmer
Jul 16, 2002
12
CA
Hello, what's the code to clear out field(s) in Access? (Take note I'm using Access 97) What I mean is that say if you had 4 fields. Employee name, Address, Phone, and Position. You want to keep the employee name, address, phone and clear out position field when you click a button. Exp. Clear button. What code do you use? I try to use [Position] = "" and ([Position]) = "" but it doesn't work. It brings an error message saying field cannot be zero-lenght string. Thank you very much for your help. :)
 
Sounds like the problem may be in the table definition. If you open that database access and then select table defintion, you can go down to that field, and see what the values for Required and AllowZeroLength. I would set Required to NO, and AllowZeroLength to YES. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Yes it works! Thank you for your help CajunCenturion! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top