I have a form with a mixtue of controls on, Combo Boxes looking up different tables, text boxes controlled by what is selected in the combo box and plain text boxes. All controls are unbound.
I used a button to run code which inserts the values entered/selected into a table. I would like the button to then clear the form ready for the user to enter new values.
I can do this by closing and reopening the form - but this isn't very neat.
I have tried using me. with refresh or undo neither of which work, but give no error messages.
I have also tried the code
Dim ctl As Control
For Each ctl In Me.Controls
ctl = vbNull String
Next
This gives me a runtime error 438.
Please help!!
I used a button to run code which inserts the values entered/selected into a table. I would like the button to then clear the form ready for the user to enter new values.
I can do this by closing and reopening the form - but this isn't very neat.
I have tried using me. with refresh or undo neither of which work, but give no error messages.
I have also tried the code
Dim ctl As Control
For Each ctl In Me.Controls
ctl = vbNull String
Next
This gives me a runtime error 438.
Please help!!