i was also trying to use filters on the OutputTo method. i found a way to do this using the OpenReport method before the OutputTo.
So the OutputTo will include in the rtf file only the conditioned data
Se below
id = Me!listboxinvoiceids
stDocName = "Test1"
DoCmd.OpenReport stDocName...
the OutputTo may not accept criteria, but it can be combined using the OpenReport.
See below:
id = Me!listboxinvoiceids
stDocName = "Test1"
DoCmd.OpenReport stDocName, acPreview, , "[InvoiceID]=" & Me!listboxinvoiceids
DoCmd.OutputTo acOutputReport, stDocName, "Rich Text Format (*.rtf)", "c:\"...
That seems to work.
Now, what is the code to save this report on the hards disk as an .rtf file?
When i preview the report, i can press the W button and the rtf file is created. how can i do this with the press of the buton?
Before i had the condtion set throught a query (named SelectInvoice) as follows:
invoiceid = forms!.main!.listboxinvoiceids
which worked.
I have entered the above condition in the button code as follows:
stDocName = "Test1"
DoCmd.OpenReport stDocName, acPrint, , invoiceID =...
Table Structure (called "Invoice Details"):
ID
Invoice No
Date
Other Details
I have a report (named "Invoices").
When i run the report, it desplays all invoices of the table.
What i want to do is to create some sort of code that will print Invoice No 1, close the report, then Invoice No 2...
Thanks
The final Code is:
ublic Sub addrange2()
Dim db As Database
Dim rs1 As Recordset
Dim rs2 As Recordset
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("TelephonesPerLocation")
Set rs2 = db.OpenRecordset("Ranges")
Dim StartNo As Long
Dim EndNo As Long
Dim LocationCode As Long
Dim count...
I have found the between operator but how can the query get the value1 and value2 (Between value1 And value2) from record1 of a table and then run the query again for the values of record2?
Yes it is like the
For i = 220001 to 221999
The table name is "NUMBERING" and the fields "LOCATION" and "NUMBER".
I have tried to do this through a query using as criteria: >= StartNumber and <=EndNumber. However i had to put every time the numberrange in order to get the data of that range...
Hello all,
I am working in a telephone company. We were given a list of locations and the ranges of telephone numbers each location can handle.
for example: Location Number Range
A 220000 - 221999
A 232000 - 232199
B...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.