Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access, I want a list box that will allow automatic printing of multi. 1

Status
Not open for further replies.

Bretcutler

Technical User
Jan 5, 2001
14
US
I am trying to make a fully automated, report printing Form. I have a form that automatically checks for new data every minute and need it to be able to print. The form has a list box that is where control numbers of unprinted reports are put. I then made a macro that will open the report based on the selection you make. Problem is, I want it to automatically print a seperate report for each of the control numbers. I don't want to have to select the control number and even now when i do it does one report for both numbers if i manually select them. If you need more info please respond and i will write more to help you understand.
Thanks, Bret
 
Ah yes, you need to start learning the powerful language called VBA.
macros and such have their limits, VBA is limitless.

I would suggest in the timer event you could open and print a report automatically.

Docmd.Openreport ...... , ACNormal
will print it right out

and the code needs to look at the list box or whatever you have for the "control numbers"
I would put them in a table so you could run a query and get back a recordset then use a

Do unitl MySet.EOF
Docmd.Openreport ...... , ACNormal
MySET.movenext
Loop

to get every one

After you are done then delete the records in the table.
Here’s a complete snippet I use a lot.

'Delete Items in list
Dim dbs As Database
Dim rst As Recordset
Set rst = dbs.OpenRecordset("History Just Print These")
rst.MoveLast
For a = rst.RecordCount To 1 Step -1
rst.Delete
rst.MovePrevious
Next

rst.Close
dbs.Close

DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top