I know how to do an update query and I can probably figure out how to search for records that are LIKE a variable, but not sure how I can put these together. Let me explain.
I import from an excel sheet using VBA, and for a frame of reference it is an attendance sheet. There are two hidden columns that contain the contactID and the attendanceID. The contactID is from tblContacts - self explanatory. The attendanceID is a junction table that has one-to-many relationships with tblContacts and tblGroups.
The dilemma is that if someone were to add a name and some contact info to the excel spreadsheet, there would exist no contactID and attendanceID for that person. The sheet is still imported into a temporary table. This is where I am getting stuck.
I figure that I would run a query on the temp table to see if the contactID and attendanceID fields are null, and if they are, search tblContacts to see if that name exists. If the name (fname and lname) doesn't exist, I would need to run an append query. I know how to do the append, just not sure how to structure the query to search and append, or essentially linking these together so that they run in the correct order.
Clear as a foggy day in London town? I thought so.
I import from an excel sheet using VBA, and for a frame of reference it is an attendance sheet. There are two hidden columns that contain the contactID and the attendanceID. The contactID is from tblContacts - self explanatory. The attendanceID is a junction table that has one-to-many relationships with tblContacts and tblGroups.
The dilemma is that if someone were to add a name and some contact info to the excel spreadsheet, there would exist no contactID and attendanceID for that person. The sheet is still imported into a temporary table. This is where I am getting stuck.
I figure that I would run a query on the temp table to see if the contactID and attendanceID fields are null, and if they are, search tblContacts to see if that name exists. If the name (fname and lname) doesn't exist, I would need to run an append query. I know how to do the append, just not sure how to structure the query to search and append, or essentially linking these together so that they run in the correct order.
Clear as a foggy day in London town? I thought so.