Default Value Refresh

  • Thread starter Thread starter Scott M.
  • Start date Start date
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
..
 
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.
 
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
 
Back
Top