E
Edward Letendre
Hello to the experts here. I have a request for some help in coding a module
that will load data from a series of joined tables to get the query I need to
make a header for a seg p1 file. I have a basic set of code such as the
following:
Dim xlapp As Excel.Application
Dim xlbook As Excell.Workbook
Dim xlsheet As Excel.Worksheet
Dim hcount As Integer
Dim headquery As QueryDef
Set db = CurrentDb
Set headquery = db.CreateQueryDef()
headquery.Name = "header_3"
from the above code, I hope to open the header_3 query to begin loading my
header file. From there I need to load 4 key pieces of information, the
prospect name, client name, line name and contractor associated with this
line data.
The next concern is a series of queres that will load some other data to
form something called the projection. This project is made up of three
values that are retried with a series of select statements that again join
tables. I don't have these queries ready as of yet, but I have a source that
I can check to get an answer I hope.
Anway, where my problem comes in is how to I access the columns of a query
from the querydef that I created to link and open the query. Once I have
done that, how do I get the data into an excel spreadsheet in a specific
order and location? I have some excel examples from another website, but I
am lost as to what to do with them. I can post them for someone to look over
and give me a better explanation or idea as to what I should do to get things
working.
You guys never let me down before so please help if you can.
Edward Letendre.
that will load data from a series of joined tables to get the query I need to
make a header for a seg p1 file. I have a basic set of code such as the
following:
Dim xlapp As Excel.Application
Dim xlbook As Excell.Workbook
Dim xlsheet As Excel.Worksheet
Dim hcount As Integer
Dim headquery As QueryDef
Set db = CurrentDb
Set headquery = db.CreateQueryDef()
headquery.Name = "header_3"
from the above code, I hope to open the header_3 query to begin loading my
header file. From there I need to load 4 key pieces of information, the
prospect name, client name, line name and contractor associated with this
line data.
The next concern is a series of queres that will load some other data to
form something called the projection. This project is made up of three
values that are retried with a series of select statements that again join
tables. I don't have these queries ready as of yet, but I have a source that
I can check to get an answer I hope.
Anway, where my problem comes in is how to I access the columns of a query
from the querydef that I created to link and open the query. Once I have
done that, how do I get the data into an excel spreadsheet in a specific
order and location? I have some excel examples from another website, but I
am lost as to what to do with them. I can post them for someone to look over
and give me a better explanation or idea as to what I should do to get things
working.
You guys never let me down before so please help if you can.
Edward Letendre.