Unmatched query

BenjaminTheBlue

Registered User.
Local time
Today, 06:41
Joined
Dec 14, 2006
Messages
14
I have a find unmatched query ( criteria - is not null ) that displays all numbers that are in both table 1 and 2. I have another field 'slot' just in table 1. Is there any way I can update that unmatched query to blank out the number. I cant delete the whole record as I need to keep the slot field. So I would just blank out the number that appears in both tables. At the moment it will not let me blank out the number from the query.

Thanks in advance Ben
 
You can use a Update Query do do this, either from the normal front part of Access or via SQL code

Function sqlCode()
DoCmd.SetWarnings False
sql = "UPDATE [Table Name].[Field Name] = ' '"
sql = sql & "SET [Table Name].[Field Name] = 'What it says now'"
Debug.Print sql
DoCmd.RunSQL sql
DoCmd.SetWarnings True
End Function
 
it isnt letting you because your doing a proper join query....

Now... if you use a less 'clean' solution:
Code:
Select * from table1 where id not in (select id from table2)

Now it is updatable.
 

Users who are viewing this thread

Back
Top Bottom