Resetting form fields

guamlet

Board Regular
Joined
Dec 29, 2002
Messages
145
How do I set up a form to have all the fields reset to blank (just like a new record) when the form opens?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hullo. In the OnOpen section for the form, put in Me.targetfield = null. That should do the trick. Curious, though: What is currently being shown when the form opens?

HTH

P
 
Upvote 0
Resetting Form Fields

When it opens, the first set of data from the table to which the form dumps its values is there. I wanted to start with a clean table, but I had to remove the ability to add new records due to a command button I installed to create new records based on multiple selections in a list box.
 
Upvote 0
I tried the null command, but it says that I can't assign a value to the object. I think that it's b/c it is a combobox that draws values from another table. I just want the form to look like I had never used it before, or like I had pushed the *> button.
 
Upvote 0

Forum statistics

Threads
1,221,522
Messages
6,160,308
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top