I want to insert from 2 identical tables only that row that has the Yes/No field Amenity set to Yes.More specificaly, i want to copy that field from table
NewParks into the table Parks.Usually there is only one row that has to be copied.
The original table Parks is set to have the field Amenity set to false.So i want to copy fields with Yes of Amenity into the the table Parks.
How can i do that ?
The function below is not right,it has errors
Dim MyEstate As String
strMyEstate = "INSERT INTO Parks " & _
"SELECT * " & _
" FROM NewParks As o1 WHERE NOT EXISTS (SELECT * FROM NewParks WHERE " & _
"ParkID=o1.ParkID And Amenity = True))"
CurrentDb.Execute MyEstate
End Function
NewParks into the table Parks.Usually there is only one row that has to be copied.
The original table Parks is set to have the field Amenity set to false.So i want to copy fields with Yes of Amenity into the the table Parks.
How can i do that ?
The function below is not right,it has errors
Dim MyEstate As String
strMyEstate = "INSERT INTO Parks " & _
"SELECT * " & _
" FROM NewParks As o1 WHERE NOT EXISTS (SELECT * FROM NewParks WHERE " & _
"ParkID=o1.ParkID And Amenity = True))"
CurrentDb.Execute MyEstate
End Function