export many querys to single spred sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

dear sir.
,
i would like to have in this way is this possible
dim exl as excel.application
set exl = createobject(excel.sheet)
exl.application.visible = true
exl.application.cells(5,1).value = MYREPORT
dim value1 as integer
value1 = 2+2-5-*458*25
exl.application.range(a1:c1).value = value1
fine it works BUT
how to have the value such as
exl.application.cells(1,1).value = query1
exl.application.cells(5,1).value = query2
querys are my access querys
reason fore this method is, any esxternal excel files addressed in docmd
method if deleted accidentaly or changed adderess will cause error
how to export many querys to single created excel sheet please.
 
You can create a UNION query that join the outputs of all queries and then
export the UNION query

Select FieldName From Query1
UNION
Select FieldName From Query2
UNION
Select FieldName From Query3
 
dear sir ,
thanks for kind advise i tried and succes with Copyfrom recordset method
which works fine now i beg for one more advise please like this
table"invoces"
invoceid number(pk)
invoceddate date/time
vehiclenumber text
vehiclestock number
Table"storagedata"
invoceid number(fk)
onhandquantity number
adedquantity number
addeddate date/time
rack id text
Table"issues"
issueid text(pk)
issuedquantity number
issuedate date/time
now i want one such an query datevise between pre said dates
like (1) openingbaleceoftheday = (sum(addedquantity) - sum(issuedquantity))
between #1/1/1889 00.00# and date2 "! said date2 is the date of the text box
value on the form "
(2) storagedata for the day = selct invoiceid,qunatityadded from
storagedata where addedate = between date1 and date2 "!date1 and date2 are
saiddates on form text box
(3) total issues of the day : select sum(quantityissed) from issues where
date is =
between date1 and date2
(4) closingbalenceof the day: (openingbalenceoftheday +total issues of the
day ) - (total issues of the day) "! data recquired for every day
fine all these works
but i want to have data for each & every day between the 2 pre said dates
in one query orin spred sheet if there is no data i would like to represent
it with "0" or " nil"
how to do it please.
kindly advise.
issueid
 
dear sir may have your kind advise regarding please
Tableâ€invoiceâ€

Field invoiceid number
“ invoicedate date/time
“ in quantity number
“ storedtocontainer text
Table “ issuesâ€
Field issueid number
“ issuedquantity numbr
“ issueddate date / time
table†adjustmentsâ€
field adjustment _date date/time
“ adjustedquantity number
“ storedcontainer text
“ remarks text
I would like to have an query like this as like an spread sheet for an full
month
Mydate = anydate of the month
Instead of writing the sql I tried, im just giving report I want

date Openingbalence=sum((inquantity + adjustedquantity )-
sum(issuedquantity)) between 1/8/89 and mydate Invoicesof the
day Totalbalence (2+3) totalisuesoftheday Closingbalenceoftheday
(2+3+7)-(5) adjustments
1 2 3 4 5 6 7
1/11/07
2/11/07 & so on till 30/11/07

Can any one advise please
balu
 
Back
Top