473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to control printing in ms access form

I have a MS ACCESS Form that was designed for printing a Departmental Store’s bills. In this form I have a 6 column list box and some labels. The user adds items to this list box as per customer’s purchasing and then prints out this bill in 6x6 size paper. Command I use for printing is:-
Expand|Select|Wrap|Line Numbers
  1.  stDocName = "Print_Bill"
  2.     Set MyForm = Screen.ActiveForm
  3.     DoCmd.SelectObject acForm, stDocName, True
  4.     DoCmd.PrintOut
  5.     DoCmd.SelectObject acForm, MyForm.Name, False
Its working fine but my problem starts when the user adds more then 20 items in list box and print out the bill. Suppose the user adds 30 items in listbox and prints it out, on paper it prints only the first 20 items. Now I want that if items are more then 20 then ACCESS continues printing to the next page. I mean print a long bill in two or three pages as per items. Thanks in advance.
May 8 '10 #1
4 2698
Jim Doherty
897 Expert 512MB
@SandeepJagdeva
I am not at all surprised that this does not work very well. The design strategy is not taking into consideration the expandability of the listbox.
How are these items being added to the list?
Is the listbox RowSourcetype property a table or is a value list?

The aim should be to create a report based on the source for the list and print the report.
May 8 '10 #2
Thanx for reply
The 'Row Source Type' property is 'Value List'. I also have a combo box in this form this comb box's 'Row Source' is a table, in which we store all product's details with their 'Bar Code'. User scan 'Bar Code' of product with 'Bar Code Scaner'. In combo's Update event I load detail (with VBA), of product such as (Name,Price) etc. That how list box filled. Reports may be good option but for me my problem is still there, because Reports also show all listbox item in single page. ????
May 8 '10 #3
Jim Doherty
897 Expert 512MB
@SandeepJagdeva
Yes any listbox would not automatically expand in a report. but in a Value list each item is separated by a semi colon.

If you think about it, a compact version of this could be sent to a textbox on any report replacing the semi colon with a control line feed Vbcrlf or VbNewline constant in code thus providing a conventional list. The textbox would expand to accommodate the growth. It depends largely on how nice and compact you want to be on the report.

Would it not be just as easy for you however to simply create a simple table to service the listbox and fill it with values? any report could reference a query that in turn references the table
May 8 '10 #4
OK I try as u say. i tell u later. Hope it works
Thanx
May 8 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Frances | last post by:
Hi All, * PREMISE * I'm creating an Access form with 150 items subdivided into 20 categories. Multiple categories (and items) can be selected so my user wants checkboxes. All of the options...
4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
1
by: Orjan | last post by:
Does anybody have a suggestion of a software or component to use if you want to display JPEG or TIFF images in a control within Access? I know that Office can do this but my customer don't want to...
2
by: authorking | last post by:
How to access a control in another form and how to make a form become a MDI container.
1
by: Arend Jan Nijenhuis | last post by:
Hi, I'm fairly new to .Net, but an expert in Microsoft Access VBA. For a large Access application, I want to create some sort of custom control (COM interop?) in VB.Net, to be used in an Access...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
1
by: miguelfc | last post by:
Hi, I've searched a lot and couldn't find an answer to my problem. I want to have a field in my form that allow me to paste an image from the clipboard to, for example, a Paint field. Then, I...
1
by: hamster | last post by:
hi i'd like to how to print a control form using C#.net I can print a richtexbox but printing a form would make it much easier thanks
5
LAD
by: LAD | last post by:
Using Access 2003 on Windows 2000. My Skill Level: Med Low (Some VBA, okay with Access) Form: Single View - based on Query of single Table to sort by field. Application: Dealers email 'contract...
7
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.