I'm attempting to create a new record in a table that has an Autonumber field and then several of the fields will remain null.
So far, this is what I have:
SQLStmt = "Insert into [000 Import Date Time Data] ([File Name], [Import Date/Time], [Posted Start Date], [Posted End Date]) Values (strFile, Date(), NULL, NULL)"
DoCmd.RunSQL SQLStmt
It seems to run fine, except it prompts me for the strFile. This has already been defined as a string AND a value has been set to it (I've verified it when stepping through the code -it's the name of the file being imported...)
What am I doing wrong with the syntax that it isn't picking up the strFile value?
Thanks,
Carie
So far, this is what I have:
SQLStmt = "Insert into [000 Import Date Time Data] ([File Name], [Import Date/Time], [Posted Start Date], [Posted End Date]) Values (strFile, Date(), NULL, NULL)"
DoCmd.RunSQL SQLStmt
It seems to run fine, except it prompts me for the strFile. This has already been defined as a string AND a value has been set to it (I've verified it when stepping through the code -it's the name of the file being imported...)
What am I doing wrong with the syntax that it isn't picking up the strFile value?
Thanks,
Carie