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

Does anyone know how to clear the contents of a field with code or cmd

Status
Not open for further replies.

HockeyFan

MIS
Jun 21, 2005
138
US
I have a form and upon clicking a button, i want it to clear the contents of almost all of the fields on the form. Since I don't want it to clear all of the field, I will need a command that I can specify which fields to clear the contents from.
I couldn't find a function or command to do this and I don't know if it will have to be in vba or not? Please help.
 




Hi,

If this is MS Access, which it seems it might be, please use an MS Access forum to post your question.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
this is a vba forum and vba is what i am looking for.
 

When you say "fields" - do you mean text in text boxes? Caption in labels? Whipe out all items in combo boxes? Clear all list boxes?

Or 'Filds" in a table, clear all records?


Have fun.

---- Andy
 
Depends on your app - please specify as it makes a BIG difference. How you do it in Access will be very different form Word or Excel or Outlook - they each have different object models and different ways you can set this kind of thing up although it is almost certain that you will need to hold a list of fields / controls to be cleared somewhere and then loop through this list

All Skip was pointing out was that if this is an Access Form then there is a specific forum for that where you will probably find people who have more specific expertise in that area

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
It was for an Access form, however I did get my answer. thanks everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top