AboutScottgem Expertise I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.
Experience I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.
Organizations Author of Microsoft Office Access 2007 VBA Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing
I get the error 'The INSERT INTO statement contains the following unknown field names: "FirsName". Make sure you have typed the name correctly, and try the operation again.'
In another similar snippet of code I was getting a syntax error.
What am I missing?
Answer First, why are you using an unbound form?
Second, drop the single quotes from the fieldnames. They are telling Access that those are text strings not fieldnames. If anything, you need to surround fieldnames with brackets [].
Third, you need to close the SQL statement with a semi colon.
But I go back to why you are using an unbound form. Unbound forms have their place, but unless you need to satisfy those reasons, you are better off using bound forms.
Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA