View Single Post
  #4 (permalink)  
Old November 13th, 2008, 10:11 PM
Old Pedant Old Pedant is offline
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 38%
Activity: 38% Activity: 38% Activity: 38%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
Default

Can Access REALLY pull values from form fields like that right into the middle of quoted strings???

That is, when you do

SQL = "INSERT INTO table (dbfield) VALUES('[formfield]')"
DoCmd.RunSQL SQL

Does it really see the [formfield] as the name of some field out in the FORM and pull in the value of that field in place of [formfield]??? I could understand that happening if the apostrophes were not around the [formfield] but surely when you use '[formfield]' you just defeated the field replacement and specified that as a literal string. NO?

And while I'm asking...how does Access know *WHICH* form to get the form fields from???

Sorry, obviously not an Access programmmer.
Reply With Quote