All,
This error is driving me insane. I've spent 2 hours trying to figure it out and/or work around it with no luck. Here's the error:
"You tried to assign the NULL value to a variable that is not a Variant data type."
Here's my SQL:
SELECT tbl_budir_002.Location_Index, tbl_parent_001.NEWPARENTID
INTO tbl_budir_003
FROM (tbl_budir_002
LEFT JOIN qry_parent_003
ON tbl_budir_002.Location_Index = qry_parent_003.Location_Index)
LEFT JOIN tbl_parent_001
ON qry_parent_003.PARENTNAME = tbl_parent_001.PARENTNAME;
I think the complication comes in at this point -- tbl_parent_001 was created via group by from another larger table (to singulate the PARENTNAME records). I had to manually go in to the table and assign the field NEWPARENTID as type autonumber so that I could give the PARENTNAME records primary keys. Now, when I run the query, I get the above error. I suspect it's the autonumber that's causing me issues, but I don't know any other way to create a primary key through using a query.
So, I need help on two things: (1) alleviating the error given my current query setup and (2) figuring out a better way to create a primary key rather than entering it in manually via the table's design view.
Thanks, Noah