Access to Excel

brsawvel

Registered User.
Local time
Today, 08:19
Joined
Sep 19, 2007
Messages
256
Hello,

I know this questions has been asked over and over, but I can’t find an answer that is dumbed down (way down) to my level. I hope I’m not asking too much, but basically a, step 1 – do this, step 2 – do this, is the easiest way for me to understand. I’m really bad with understanding code jargon. Or if this is too much, maybe if someone knows where I can find an easy step-by-step instruction for dummies online.

I’m trying to send record from an access table to an excel template using a button on my form...

Using one field from my access table, here is what I want to have happen –

Access Table

fldTaskNumber
1234
1235
1236


Excel Template

A B
1 Task Number
2 1234
3 1235
4 1236


How do I go about doing this?
 
I would create a query that I can output to Excel

STEP 1: create and save a query, something like
"SELECT <YOURFIELD1> AS CODE, <YOURFIELD2> AS NAME, <YOURFIELD3> AS TITLE FROM <MYTABLE>"

STEP2: output the query to Excel
DoCmd.OutputTo acOutputQuery, <yourqueryname>, acFormatXLS,, -1

CODE, NAME AND TITLE will be the heading on your worksheet
 

Users who are viewing this thread

Back
Top Bottom