Link to home
Start Free TrialLog in
Avatar of Harry Batt
Harry Batt

asked on

Help with SQL Statement

I need help with an Update SQL for a form, which also contains a subform. Once a record is saved in tblContacts, I would like to create a corresponding record in tblHeuristics that has the Contact ID saved as the as the foreign key as well as the value of a control named "cboAskAmount" whose record source is [SuggestedAskAmount] the code I have written below doesn't work, which doesn't surprise me since I am new to VBA. Can anyone help?
INSERT INTO tblheuristics ( fk_ContactID, SuggestedAskAmount )
SELECT tblHeuristics.fk_ContactID, tblHeuristics.SuggestedAskAmount
FROM tblHeuristics
WHERE (((tblHeuristics.SuggestedAskAmount)=[Me].[subfrmHeuristics].[Form].[cboAskAmount].[Value]));

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Russell Fox
Russell Fox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial