Good day
I have a table(abc) with 2 fields (items = type TEXT) & (Check = type Yes/No)
I created a form, in a sub-form Table(abc) displays items, and a checkbox(check)
How do I code a query to save only the items checked in another table.
plz
Good day
I have a table(abc) with 2 fields (items = type TEXT) & (Check = type Yes/No)
I created a form, in a sub-form Table(abc) displays items, and a checkbox(check)
How do I code a query to save only the items checked in another table.
plz
It seems that you may want a Make Table or an Append Query:
Dim db As Database
Set db=CurrentDB
''Make table, NewTable must not exist
strSQL="SELECT Field1, Field2, CheckedField INTO NewTable "
& "FROM SomeTable WHERE CheckedField = True"
db.Execute strSQL, dbFailOnError
''Append query
strSQL="INSERT INTO ExistingTable (Field1, Field2, CheckedField) "
& "SELECT Field1, Field2, CheckedField " _
& "FROM SomeTable WHERE CheckedField = True"
db.Execute strSQL, dbFailOnError