I use the following query to determine whether a record is stored in my underlying Supplier Information table based on the value the user enters for the Tax ID. What I need to be able to do with this is once it runs, if the query returns empty I need to append the Tax ID that was entered into the below paramater query to the Supplier Information table.
Here's what I need:
(1)Run the Below Select Query
(2)If the value entered for WHERE ((([Supplier Information].[Tax ID])=[Enter Tax ID #])) is not in the underlying Supplier Information table then
(3) Append the value entered for WHERE ((([Supplier Information].[Tax ID])=[Enter Tax ID #])) to the Supplier Information table
SELECT [Supplier Information].[Tax ID], [Supplier Information].[Supplier Name], [Supplier Information].Address, [Supplier Information].City, [Supplier Information].State, [Supplier Information].[Zip Code], [Supplier Information].[Duns #], [Supplier Information].[M/WBE Owned], [Supplier Information].[FEIN/SSN]
FROM [Supplier Information]
WHERE ((([Supplier Information].[Tax ID])=[Enter Tax ID #]));
Some more details: The query runs if the user selects "Yes" on a MsgBox
When the query runs the user gets the Enter Tax ID # box
Can anyone give me some ideas on how to get this accomplished
Thanks!
Here's what I need:
(1)Run the Below Select Query
(2)If the value entered for WHERE ((([Supplier Information].[Tax ID])=[Enter Tax ID #])) is not in the underlying Supplier Information table then
(3) Append the value entered for WHERE ((([Supplier Information].[Tax ID])=[Enter Tax ID #])) to the Supplier Information table
SELECT [Supplier Information].[Tax ID], [Supplier Information].[Supplier Name], [Supplier Information].Address, [Supplier Information].City, [Supplier Information].State, [Supplier Information].[Zip Code], [Supplier Information].[Duns #], [Supplier Information].[M/WBE Owned], [Supplier Information].[FEIN/SSN]
FROM [Supplier Information]
WHERE ((([Supplier Information].[Tax ID])=[Enter Tax ID #]));
Some more details: The query runs if the user selects "Yes" on a MsgBox
When the query runs the user gets the Enter Tax ID # box
Can anyone give me some ideas on how to get this accomplished
Thanks!