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

How do you reset a value in a table when the form close?

Status
Not open for further replies.

cctrinh

MIS
Feb 2, 2001
25
US
I tried a few way to reset a value in a table when I close the form but not working. Can someone give me some advise how to reset a value in a table when I click on a button in a form?

Thank you,
 
Hello there!
I don't quite understand your question but I'll give it a shot anyway...
Some where on your form you'll have a field that is bound to the table you want to reset. Set this fields "default value" to the value you want. (The fields properties dialog, Data tab, default value "field") type in:

101 (or if it's a string): "Dalmatians"

Now when you click the button, in its "On click" event (as above but in its "field" select "event procedure" then click "..." just beside, to open Visual basic) add something like this between the sub title and "end sub" that it just made for you automatically:

Me![NameOfYourField] = Me![NameOfYourField].DefaultValue

Close and save. I hope this is what you're looking for...if not write back! Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top