Hi Farley,
I'd suggest using an append query to do this rather than VBA code.
You can use the QBE (query) grid to create an append query, and type "True"
into the criteria row of your "Checkbox" field.
When finished, if you look at the query's SQL view, it should look something
like this:
(Your's will have different table and field names of course)
INSERT INTO tblNewTable ( Field1,Field2, Field3 )
SELECT tblOldTable.Field1, tblOldTable.Field2, tblOldTable.Field3
FROM tblOldTable
WHERE (((tblOldTable.YourCheckboxField)=True));
-------------------------------
BTW,
You can also use an update query either before making checkbox selections,
or after running the append query in order to "reset" your selections.
Something like:
UPDATE tblOldTable SET tblOldTable.YourCheckboxField= False
WHERE (((tblOldTable.YourCheckboxField)=True));
-------------------------------
PS. You'll have to make sure that the last form record you selected gets
saved before running the either of these queries
The easiest way to do so is by using the checkbox's AfterUpdate event...
Just use "Me.Dirty = False" as in the example below:
Private Sub Check37_AfterUpdate()
Me.Dirty = False
End Sub
-------------------------------
--
HTH,
Don
=============================
Use
My*****@Telus.Net for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.
Do Until SinksIn = True
File/Save, <slam fingers in desk drawer>
Loop
================================
"Farley" <ha********@hotmail.com> wrote in message
news:eM****************@ord-read.news.verio.net...
I want to populate a table based on a checkmark being inserted on a form.
Example, if the check mark is present, i want the customer number (which
exists on the form) to be inserted in another table.
Not too competent in vba but am making progress. Not sure how to get the
information from the form [custno] to the new table [custno].
Thanx for your help