Clear Feilds, then Go to Next Record

DaleFromEngland

Registered User.
Local time
Today, 21:39
Joined
Jul 16, 2001
Messages
15
Hi folks

This is my question:

I have two forms, ONE is a Main form linked to a query. It has Fields for Diagnostic/Action Taken - IT SUPPORT NAME - Time Of Call Close - Date of Closed.

The SECOND form is a subform that has the above fields but with other fields. This subform has been designed as a DATASHEET form.

I have then linked the TWO forms togeather using the IT SUPPORT NAME, So when the user choose their name from the combo box, the form will show all records that havent been closed in the subform.

What the user does is, that they choose which record that they want to close, edit, etc.
I have created a button that will fill in the date and times when the button is clicked.

But when you click the button, the FIELDS in the MAIN FORM dont clear, and the RECORD that i have just updated, DONT dispear, Untill you choose your name again. What i want it to do is to clear the FIELDS automatically, and update the SUBFORM details.

THESE FORMS BOTH RUN FROM THE SAME QUERY, BUT HAVE DIFFERENT PURPOSES.

By the way, i have tried the REQUERY MACRO, but to no joy. I REALLY REALLY Need this to work.

So this is the SCOPE:

TO CLEAR FIELDS WHEN DATA HAS BEEN ENTERED, AND TO REMOVE THE RECORD THAT HAS BEEN UPDATE STRAIGHT AWAY.
Thanks in advance.

[This message has been edited by DaleFromEngland (edited 09-07-2001).]
 
Dale,

Have you tried using code to requery instead of a macro?

Firstly, where is the button that you use to update your subform. You must make sure that you reference the requery right if you have the button on the main form.

[Forms].[mainformname].[subformname].[textboxname].requery

To clear the fields in the main form (I am assuming txtboxes) use:

me.txtboxname = ""

If you want to clear the values from a combobox, I use:

Me.comboname = Null
Me.comboname.Requery
Me.comboname = "Choose your name"

Also try:

me!requery

in the subform to requery the entire recordset


HTH

[This message has been edited by Irie (edited 09-07-2001).]
 
IRIE,

Thanks for answering my question, but where do i put the [Forms].[mainform] and so on expression.

Thanks.
 
Dale,

The code should go in the on_click property of the commad button.

HTH
 

Users who are viewing this thread

Back
Top Bottom