I am creating a form in MS Access that exceeds 22 inches in length. This form is extremely long so I am using tabs to spread out the questions.
I've now copied the form (with the tabs) on to a report in order to filter the data and to print it.
The name of the Tab control on the report is 'TabCtl219' and the report name is 'rpt_ADMIN'. I'd like to write some vba to print page 1, page 2, and page 3. Considering I can manually flip through the pages on the report, i'd like to print each page using vba. Currently, it will only print page 1.
Your thoughts are greatly appreciated.
One possible solution would be to get rid of the tab control and spread out the ui-elements and information over several pages.
Related
I suspect my strategy is incorrect as I can't seem to apply my search results for the keywords I've used over the last few days. ( https://stackoverflow.com/questions/54496552] seems to be the closest. )
I am able to populate a single document from the two forms I've built and save it under a new name
...
MsgBox "Saving as " & aFullPath
ActiveDocument.SaveAs FileName:=aFullPath, FileFormat:=wdFormatDocumentDefault
But that changes the name of my parent document that contains my forms (Word2016 document name: waiver.docm). In practice, that won't be a problem because the user will not be saving "waiver.docm" except by accident.
But that's why I think my approach is wrong.
Ideally my VBA code would
Load a protoype waiver template with the page heading, bookmarks and table as I have now in my waiver.docm.
Upon filling that template, append another waiver template as a new page.
And return control to the form
Repeat above two steps of appending of sheets until the user indicates completion (e.g. "Finish" command button). Typically after 1 to 4 pages
Print and save the entire document.
Right now I interrupt the process after each page to force my prospective user to print and save the document (and under a unique name).
I have several forms that are the result of engineering calculations. I would like them to print to the printer in a given format, maybe with a letter head etc. All I can do right now is print the form as it shows on the screen - not what I want. The VB report viewer seems to depend on database data and I can't find a way to just print the data in my text boxes and tables in a format and position that I want..
Any help will definitely be appreciated..
I am using Access 2007. I want to use VBA code that will programmatically
run an Access Report a series of times. Something like this:
Dim eid$(5)
eid$(1)="001":eid$(2)="021":eid$(3)="043":eid$(4)="052":eid$(5)="067"
for i=1 to 5
Forms![frmWork]!txtEid=eid$(i)
DoCmd.OpenReport "rptEmployees", acViewPreview
next i
The report uses a query that contains:
WHERE (employee.eid)=Forms![frmWork]!txtEid
After the report appears on the screen I want it to immediately close - without the user
clicking Close Print Preview - and return to the VBA loop so another report can be generated.
You may wonder why I'm doing this? Let's just say I'm experimenting.
My question is...how can I get the report to close? Is there an event that occurs
when a report has finished printing?
If I knew how many records (n) were output by the query I could put a counter
in the report's Detail_Print() code. When the counter reached n I could have the report close.
Can I determine how many records are in the query results when the report opens?
Thanks very much.
I am facing strange with the PDF printing with Foxypreviewer in Visual foxpro while trying to print multiple reports to one pdf using "NOPAGEEJECT".
We have some reports, which are supposed to be printed on in the vertical direction while other reports are supposed to be printed in the horizontal direction.
Now I get all pages in the same direction, depending on which direction the first report in the template have.Sample code is given below which I am trying to print to pdf:
REPORT FORM Itinerary01 object type 10 NOCONSOLE NOPAGEEJECT
REPORT FORM Itinerary02 object type 10 NOCONSOLE
Please help me to solve this.
The magic is that if I run these file one by one then only the last one will go for pdf but when I selected both and execute, the result was OK.
You are running files from command prompt so you can not get desired result. Put these command in a prg and see the magic.
REPORT FORM LOCFILE(_Samples + "\Solution\Reports\Colors.frx") ;
OBJECT TYPE 10 NOPAGEEJECT NORESET TO FILE "d:\Test.pdf"
REPORT FORM LOCFILE(_Samples + "\Solution\Reports\Percent.frx") ;
OBJECT TYPE 10 PREVIEW
I'm referring to this post here:CorelDraw X6 Macro to insert Date using DTPicker Control
I am creating a template for everyday use for saving artwork proofs to send onto customers for visual approval. I'd like the following boxes to auto populate the following information:
1. A box that will populate today's date
2. A box that will populate the work order number based on the first 6 digits of the filename
3. A box that will populate the filename as a whole
The rectangles/boxes will already be in the document that gets imported. I just want to create a macro, or multiple...to click in order to fill these boxes before exporting to a PDF for customers approval.
I'm a total coding n00b and can't find specific directions on where to copy the code listed in the link above.
In the Corel Draw menu, go to "Tools" then "Macros" then "Macro editor".
After that, you can paste it in the right hand side of the screen, on the white empty box.
That should do it.