Want to export choosen records from Access to Xls

dejanc

Registered User.
Local time
Yesterday, 18:55
Joined
Aug 4, 2009
Messages
45
Hello all,
I have an access database. Have create a table, form, etc. In form I have create a Macro button which is exporting all records into Xls file.

Next to that button I have put Check Box, which I would like to use, if Yes, then only this record will be exported to Xls.

I`m still learning, so thanks in advance for help...
 
Last edited:
You could certainly do an export to Excel in this manner but it's not the way I would do it. If you are exporting five records in this manner, you would end up with five separate Excel spreadsheets. You would also have to go back and unclick the boxes you clicked to mark the records for export, otherwise they would be exported again the next time you did this function.

Allow me to suggest that you mark the records for export, then export them all at once. You would do this via a query (export all marked records). Then run a second query to put all the checkboxes back to blank.
 
thanks Statsman. i will try it...
 
can someone assist me on this ....

i have also created a access DB file ... what i wanna do is once the data has been entered , how do i put the code in a button to export the entered data to a .txt file or .xls file ?

i dont know the code to implement this... im still new at this but cant seem to find the code or an example to run by ...

thanks in advanced
 
have a button

create a button click event

in the button click event code start typing

docmd.transferspreadsheet

you will then be asked for stuff like the queryname, the diskfilename etc etc

help is quite clear on this
 

Users who are viewing this thread

Back
Top Bottom