update query problem, need help.

G

Guest

I have a main form ("employee") and a sub-form ("department subform") for
tables "employee" and "department" respectively.

What I need to do is update the "rate" field in "department" from the "rate"
field in a temporary sheet called "sheet1" using EmployeeID as the reference.

Running the following SQL, I get parameter value boxes.

UPDATE Department AS Subform
SET form!sheet1!rate = [forms]![employee]![department
subform].Form.controls![rate]
WHERE ([form]![sheet1]![employeeID]=[forms]![employee]![department
subform].Form.controls![employeeID]);

I can't see where I am going wrong.
 
G

Guest

scubadiver said:
I have a main form ("employee") and a sub-form ("department subform") for
tables "employee" and "department" respectively.

What I need to do is update the "rate" field in "department" from the "rate"
field in a temporary sheet called "sheet1" using EmployeeID as the reference.

Running the following SQL, I get parameter value boxes.

UPDATE Department AS Subform
SET form!sheet1!rate = [forms]![employee]![department
subform].Form.controls![rate]
WHERE ([form]![sheet1]![employeeID]=[forms]![employee]![department
subform].Form.controls![employeeID]);

I'm not sure what a sheet is, but your WHERE clause refers to two form
controls. One side of this statement needs to point to a field in the table.

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top