I have set up a a form to select the parameters for a query.
I have tried to create a button for the user to clear all of the parameters to save them having to do it one by one manually or having to close the form and reopen.
I have used the following Event Procedure:
Private Sub Command31_Click()
Me.tskref1.Value = ""
Me.cname1.Value = ""
Me.admin1.Value = ""
Me.daterecd1.Value = ""
Me.tskdesc1.Value = ""
Me.memtsk1.Value = ""
Me.admin2.Value = ""
Me.complete1.Value = ""
End Sub
It clears the data fine, however when some new data is entered it states that Run Time error 2001 has occurred "you cancelled the previous operation".
I am sure I have just missed off a bit of code somewhere to reset the parameters or something.
Has anyone any ideas?
Thanks in advance
K
I have tried to create a button for the user to clear all of the parameters to save them having to do it one by one manually or having to close the form and reopen.
I have used the following Event Procedure:
Private Sub Command31_Click()
Me.tskref1.Value = ""
Me.cname1.Value = ""
Me.admin1.Value = ""
Me.daterecd1.Value = ""
Me.tskdesc1.Value = ""
Me.memtsk1.Value = ""
Me.admin2.Value = ""
Me.complete1.Value = ""
End Sub
It clears the data fine, however when some new data is entered it states that Run Time error 2001 has occurred "you cancelled the previous operation".
I am sure I have just missed off a bit of code somewhere to reset the parameters or something.
Has anyone any ideas?
Thanks in advance
K