colossus02
New member
- Local time
- Today, 13:19
- Joined
- Oct 4, 2011
- Messages
- 4
I'm having a very tough time trying to use a insert SQL statement in VBA. I built the query in query design so I know it works, I just can figure out the problem in VBA. I believe it has something to do with the textbox value I'm bringing into the query. Any help would be greatly appreciated.
Code:
DoCmd.RunSQL ("INSERT INTO tbl_WP_Acquisitions.WPID, tbl_WP_Acquisitions.AQID, tbl_WP_Acquisitions.ShortTitle " _
& "Select (" & Me.txtCurrentID.Value & "), tmptbl_Acquisitions.AQID, tmptbl_Acquisitions.ShortTitle FROM tmptbl_Acquisitions " _
& "WHERE tmptbl_Acquisitions.Selected = True")