The problem exists cause you have a field or control named Name.
The form also has a property called Name, so your statement is ambiguous.
Rename the control to something like txtName, and change the query.
There are more than 1000 of these reserved words and problem names. Date,
Year, Month, Caption, Height, and so on. For an up to date list, download
the sample database from this link, and see tblBadWords:
http://allenbrowne.com/AppIssueChecker.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"WØCBF" <w0***@yahoo.comwrote in message
news:11**********************@a14g2000cwb.googlegr oups.com...
>I am trying to copy the information from a form into a table. I have
tried running the sql code from a macro by using the command :
This works and writes the work 'test' into the field name 'name' in the
'temptable' table:
insert into temptable (name) values (test)
But I don't know the correct syntax for writing the field on the form
into the test table. I tried (with no luck) to use this code:
insert into temptable (name) values (forms!frmsupplier.name)
But this writes the word 'frmsupplier' into the field.
Any help would be appreciated.
Thanks
Chuck