S
Secret Squirrel
I need to create a function that checks 3 tables to see if a record exists.
If it doesn't then I need to create a record in one of the tables. There is
an import that runs nightly to tblTable4 and that's the data I need to
cross-reference with the tables below. After the import I want to run this
function to look at these tables to see if a record exists.
Tables to check:
tblTable1
tblTable2
tblTable3
Fields to check:
EmpID (Number)
Date (Date/Time)
If the record exists in any of these tables then do nothing.
If the record does not exist in any of these tables then create a record in
tblTable3 using these fields from tblTable4:
EmpID
Date
This field below is in tblTable3 and needs to have a default value of "OE"
for any record that is created by this function:
Type - Default value of "OE" for any record that is created
I'm not good with writing this type of code so I was hoping someone would
show me the way.
Thanks
SS
If it doesn't then I need to create a record in one of the tables. There is
an import that runs nightly to tblTable4 and that's the data I need to
cross-reference with the tables below. After the import I want to run this
function to look at these tables to see if a record exists.
Tables to check:
tblTable1
tblTable2
tblTable3
Fields to check:
EmpID (Number)
Date (Date/Time)
If the record exists in any of these tables then do nothing.
If the record does not exist in any of these tables then create a record in
tblTable3 using these fields from tblTable4:
EmpID
Date
This field below is in tblTable3 and needs to have a default value of "OE"
for any record that is created by this function:
Type - Default value of "OE" for any record that is created
I'm not good with writing this type of code so I was hoping someone would
show me the way.
Thanks
SS