Help with "Undo" Please

  • Thread starter Thread starter Shadow
  • Start date Start date
S

Shadow

How can I reset a form?

The form is an unbound form and the users inputs some values or selects some
options to search tblOrder table. I need when the user click a button, all
the textboxes, frames and everything else goes back to their default values.

"Me.Undo" doesn't work out. Maybe because the form is unbound.


any kind of help is much appreciate.



thanks in advance
 
Shadow said:
How can I reset a form?

The form is an unbound form and the users inputs some values or selects some
options to search tblOrder table. I need when the user click a button, all
the textboxes, frames and everything else goes back to their default values.

"Me.Undo" doesn't work out. Maybe because the form is unbound.


Either I don't understand your problem or you can just add
code behind the button that assigns your "default" value to
each control.
 
Shadow said:
How can I reset a form?

The form is an unbound form and the users inputs some values o
selects some
options to search tblOrder table. I need when the user click
button, all
the textboxes, frames and everything else goes back to their defaul
values.

"Me.Undo" doesn't work out. Maybe because the form is unbound.


any kind of help is much appreciate.

how about using the DefaulValue property? It's based on the Defaul
Value that is defined in the controls property.

Private Sub resetDefaults_Click()
myfirstTxtbox = myfirstTxtbox.DefaultValue
mysecondTxtbox = mysecondTxtbox.DefaultValue
mythirdTxtbox = mythirdTxtbox.DefaultValue
...
End Sub

Not sure if this is what you are looking for..
 
Shadow said:
How can I reset a form?

The form is an unbound form and the users inputs some values o
selects some
options to search tblOrder table. I need when the user click
button, all
the textboxes, frames and everything else goes back to their defaul
values.

"Me.Undo" doesn't work out. Maybe because the form is unbound.


any kind of help is much appreciate.

how about using the DefaulValue property? It's based on the Defaul
Value that is defined in the controls property.

Private Sub resetDefaults_Click()
myfirstTxtbox = myfirstTxtbox.DefaultValue
mysecondTxtbox = mysecondTxtbox.DefaultValue
mythirdTxtbox = mythirdTxtbox.DefaultValue
...
End Sub

Not sure if this is what you are looking for..
 
thanks Marshall and Rick,

I was imagining there should be something else for unbound forms instead of me.undo
It seems that using a loop and resetting all the controls in a form by defaultvalue property is
the only way left for me.


thanks for your advices.

shadow


How can I reset a form?

The form is an unbound form and the users inputs some values or selects some
options to search tblOrder table. I need when the user click a button, all
the textboxes, frames and everything else goes back to their default values.

"Me.Undo" doesn't work out. Maybe because the form is unbound.


Either I don't understand your problem or you can just add
code behind the button that assigns your "default" value to
each control.
 
Back
Top