Sample of VBA to export inventory table.

hfsitumo2001

Member
Local time
Today, 12:27
Joined
Jan 17, 2021
Messages
394
I want to make inventory location mark in one paper like below. The way I make it is to export inventory table in excel and then I merge with the Publisher form/paper. Can anyone give me the VBA for click button to export the inventory table?. I want just to press one button in Admin form which is my form and do export.
Is there any way we do merging in MS Access environment?

Thank you
 

Attachments

How about creating a report and printing it to a PDF printer?
 
Try this VBA:
DoCmd.OutputTo acOutputReport, "Inv_Bin", _
acFormatPDF,"C:\Users\desktop\PDFs\Report1.pdf"
 
Try this VBA:
DoCmd.OutputTo acOutputReport, "Inv_Bin", _
acFormatPDF,"C:\Users\desktop\PDFs\Report1.pdf"
Krayna, actually the attachment you see is not in pdf, I just scan my sample in pdf and I send it in this forum. The one that you see I did it like this. I exported my table inventory then I merged it with my MS Publisher template, and in merging process there is a time to ask us which records that we want to merge then I chose and we can preview them than I printed.
My question , can we make the report so fancy like the template that I made in publisher?
 
Sorry, yes I definitely think it is possible to do this natively in Access. You can base report on specific query if you only want specific records.
If you use the line tool, you can achieve your illustrated border.
 
My question , can we make the report so fancy like the template that I made in publisher?
That looks pretty simple to make. There is a rectangle object to make the border.
 
Sorry, yes I definitely think it is possible to do this natively in Access. You can base report on specific query if you only want specific records.
If you use the line tool, you can achieve your illustrated border.
Thanks Krayna, I will give it a try.
 
Here is a quick example

Clipboard01.jpg
 

Attachments

Thank you MajP, I will do like that and I will try to make query to choose which one to print
 
MajP, how can you do it so fast
For the demo. I picked an existing table and selected create report. It automatically builds the report with the controls. Then just moved the text boxes and resized them. A couple minutes. I selected a rectangle and made the background (transparent. Change from normal so it is not filled in). Hit copy twice and used the arrows to size. a couple more minutes. It may looks fancy with the borders, but very simple.

If you do not have a very large amount you can also simply make a pdf of all. Then select from the PDF the page you want to print.
 
For the demo. I picked an existing table and selected create report. It automatically builds the report with the controls. Then just moved the text boxes and resized them. A couple minutes. I selected a rectangle and made the background (transparent. Change from normal so it is not filled in). Hit copy twice and used the arrows to size. a couple more minutes. It may looks fancy with the borders, but very simple.

If you do not have a very large amount you can also simply make a pdf of all. Then select from the PDF the page you want to print.
Thank you MajP, Yes I have made it, and the data is from inventorytable, but do you have anyway to filter which itemcode to print?
 
For the demo. I picked an existing table and selected create report. It automatically builds the report with the controls. Then just moved the text boxes and resized them. A couple minutes. I selected a rectangle and made the background (transparent. Change from normal so it is not filled in). Hit copy twice and used the arrows to size. a couple more minutes. It may looks fancy with the borders, but very simple.

If you do not have a very large amount you can also simply make a pdf of all. Then select from the PDF the page you want to print.
Again Thank you MajP, I made it and with the selection filter to print which one we want to print, and it works. Thank you very much
 
You beat me, but here is a simple idea. Open the report and use the right mouse to export in the format you want.

export.jpg
 

Attachments

Users who are viewing this thread

Back
Top Bottom