Default Value Refresh

S

Scott M.

When I exit and reload a form, it still has remnants of
the last data that was entered. I checked default values,
and all just had blanks for those. What's the best way to
make the form clear out all of controls when it loads?

My idea: Sub Form_load()
docmd.(no clue)

Any help is appreciated.

Thanks,
-Scott
..
 
F

Frank Stone

you need a clear form sub that you can call on some event
such as form close, open, save record ect. you can also
tie it to a clear form button. here is a sample of one i
set up in one of my db's.

Private Sub Clear_Form_Click()
On Error Resume Next

Me!txtControlNbr = Null
Me!txtItemID = Null
Me!txtDescription = Null
Me!txtVendorName = Null
me!ect,ect,ect

end sub.
 
S

Scott

I put this coad into the button, and it worked fine, but
when I tried to do it in Sub Form_Load(), the same data is
still in from the last time. However, your button does
work great, thanks.

-Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top