Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting selected data to another database

Status
Not open for further replies.
Jun 18, 2002
126
US
I have a table that has a checkbox for every record. Once the check box has been checked, I would like to export the record to another database, or even another table if that is easier. How do I do this? Thanks!!!
 
You need to start of by creating a form based on your table. Then, for the check-box you want to trigger the event you need to write some code on the AfterUpdate event, something like:

Code:
Private Sub chkMyField_AfterUpdate()
Me.Dirty = False
DoCmd.TransferDatabase acExport, , , , "tblMyTable", "c:\temp\db1.mdb"
End Sub

This example is pretty simple - it exports the
Code:
tblMyTable
table to
Code:
c:\temp\db1.mdb
. The
Code:
Me.Dirty
line equates to saving the current record you've just modified by ticking the check-box.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top