populating field with query result

sjs01

Registered User.
Local time
Today, 20:42
Joined
Feb 23, 2006
Messages
12
I have got 2 tables:

TAT table with fields: ID, SPB, SET, DAYSIN, HRSIN
SETS table with fields: ID, SPB, SET, DAYSIN, HRSIN, plus a few other fields.

Is it possible to do the following:

If (SPB.TAT = SPB.SETS) AND (SET.TAT = SET.SETS)
then store
(DAYSIN.TAT in DAYSIN.SETS) AND (HRSIN.TAT in HRSIN.SETS)

Thanks for any help with this.
 
1) Why you have got same data in two tables, it isn't
neceseary, except foreign key.
2) Try to do thet with UPDATE QUERY.
 
The 'SETS' table has been populated with data for some time. I have been asked to incorporate 2 new data fileds - DAYSIN & HRSIN in this table. This is ok for future data, but I need to populate these fields for past data. So, I thought I would gather past data and store this in a new table called 'TAT'. I would then update the necessary fields (ie. DAYSIN & HRSIN) in the 'SETS' table. What do I enter in the 'Update to' cell. I've tried entering DAYSIN.TAT and HRSIN.TAT in the update to cell for the DAYSIN.SETS & HRSIN.SETS columns (I'm doing the query in design mode). When I run the query I am prompted to enter parameter values for daysin.tat???
 
Look at "DemoUPDsetsTableA2000.mdb".
Because I don't know your task, I did an improvisation.
Look at tables, look at Query1UPD. Run query. The records
1, 5, 7 in tbl "SETS" will be updated in fields DAYSIN and HRSIN.
 

Attachments

thanks very much for that - works a treat!!
 

Users who are viewing this thread

Back
Top Bottom