Need to update a field

Dgavilanes

Registered User.
Local time
Today, 22:35
Joined
Jun 25, 2001
Messages
109
Hi all,
Need to update a field from a subforn to a field in the main form.

All records in the main frm are captured as pending until the transactions are process in the subfrm and a field is worded "complete" then would like to update the main field from "pending" to complete

the main form name is = Frm_Datadepot
and the main field is called = Status

the subfrm field name is = Status1
So when Status1 becomes complete, Status changes from pending to "Complete

Any help woul be greatly appreciated


thanks

Dennis
 
D,

The best way to do this is to forget the Status field in
your main form. To find the completed ones:

Code:
Select MainTableKey, MainTableOtherInfo
From   MainTable
Where  MainTableKey in (
   Select Distinct MainTableKey
   From   ChildTable
   Where  Status = "Completed")

Or use the "Not In" clause to find the incomplete parents.

That way you won't have to add any code to your form(s) won't be storing the same info in more than one place.

Wayne
 
Update field

Thanks for your quick replied, will give it a try


have a nice day


Dennis
 

Users who are viewing this thread

Back
Top Bottom