 |
|
 |
yronium Level: Moderator

 Registered: 14-04-2002 Posts: 910
|
Re: Form
quote: If the user opens the SYSTEM RESTART form the date and time will automatically display on the input form. However, if the user opens the form by mistake, realizes it and closes the form, it still shows up in the dB as a record
I guess it happes because you open the form in a connected mode. I mean, you linked all the controls to the fields of a recordset, setting their DataField property, isn't it?
It's better working disconnected. You open a form and show in the textbox the current date and time. When you close the form nothing happens, as the textboxes have their DataField property not set, so they have no place to store their data. They are just some unbound control, not different from the textbox in old HelloWorld.exe.
If you need to save data you do it explicitly, by clicking the Save button. In this case you open the recordset, move to the new/desired record, edit the fields, save and close the recordset.
quote: How do I build a form that will NOT save the data when the user hits the EXIT button. There are two modal buttons at bottom of the form. SAVE and EXIT.
The way I described above, the Exit button will cause only form's unload.
Hope it helps

____________________________
Real Programmer can count up to 1024 on his fingers
|
|
12-12-2005 at 11:59 PM |
|
|
|
|
 |
 |