Question Update Query

asif pasha

Registered User.
Local time
Today, 11:39
Joined
Jan 8, 2010
Messages
60
Hi,
Please help me with the code below.

UPDATE tblquerylog SET tblquerylog.Programworkstream = DLookUp("[Programme Workstream]","tbllookuptables","[Account]"="tblquerylog.SAP_Company_Code_Account");

where->
tblquerylog is a table
Programworkstream is a field in the table tblquerylog
tbllookuptables is a table where you can find the value
 
If the field you are updating is a test field it nees enclosing in quotes.
 
Sorry, i didn't get it.
What i am trying to do is : There are 2 tables.
1) contains all the fields with the respective details.
2) other contains the record, in which i need to update the field1 depending on the account no which is available in both the table. Field1 is also available in the table1.

I want to lookup the value for field1 in table1 with reference of account no in table2 and update accordingly.

Please help me with this. As there are thousands of record. if possible can you please provide me with the example
 
Create a new update query.

UPDATE tblquerylog SET tblquerylog.Programworkstream = DLookUp("[Programme Workstream]","tbllookuptables","[Account]"="tblquerylog.SAP_Company_Code_Account");

Include tables tblQueryLog, tblLookupTables
Create join between Account and SAP_Company_Code_Account

Set the update to parameter to be TblLookupTables![Programme Workstream]

Also your syntax is wrong.
 

Users who are viewing this thread

Back
Top Bottom