Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to write an update stmt with inner join; Access 97 VBA

Status
Not open for further replies.

nonyup

Programmer
Jul 22, 2004
1
US
Hi, can anyone help me out? I'm trying to update a field in a table. What I have is 2 tables, and want to update the field in one when a condition is met. Here's the SQL generated when I create it as a query:

UPDATE tblAdjustmentDetail INNER JOIN tblTimeslipDetail ON tblAdjustmentDetail.InvTxt = tblTimeslipDetail.[MIDAS/JDE Invoice Number] SET tblTimeslipDetail.[JDE-Adj] = "V"
WHERE (((tblAdjustmentDetail.[Adjust Flag])="V"));

I want to be able to write this in code rather than calling a premade query. Any help would be appreciated....

thanks!!!
 
Take a look at the DoCmd.RunSQL method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top