473,386 Members | 1,654 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.

Multiple report copies with incrementing number

I have a form created from one table, the form has a lookup which finds products as the user types the product name in. When the user selects lookup record it gets loaded into the form.

What I am trying to do is have the user select the record and load it into the form (acheived this so far), then click a print preview button and be prompted to enter the number of copies of this report to print then ask them for a beginning number which will be added to an independant field on the report and be incremented by 1 for each copy of the report printed. (Access 2003) Is this possible?
Nov 5 '06 #1
1 1533
NeoPa
32,556 Expert Mod 16PB
The only way I can think of to do this, is to have a table (tblCount) with simple numbers in it as the whole record.
Before the process starts delete all records from the table.
Using DAO (or ADO whichever is the better version - I don't keep up with that), write some code that loops through creating records in this table to match the numbers you require in your report.
You have the Product code already in a field (txtProduct for instance) on the form (frmProduct).
Create a Report, whose Record Source is a query or SQL of the form :-
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM tblCount, tblProduct
  3. WHERE ([ProductID] = Form_frmProduct.txtProduct)
If writing the SQL within code, the last line could be done as
Expand|Select|Wrap|Line Numbers
  1. "WHERE ([ProductID] = '" & txtProduct & "')"
Nov 6 '06 #2

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

Similar topics

4
by: Don Seckler | last post by:
I am building an application to track the distribution and returns of copies of magazines. Copies of a magazine that are unsold are returned by the retailer to the wholesaler. They are...
8
by: Hank Reed | last post by:
Hello, I have searched through dozens of old responses to this question but have been unable to make it work in my situation. I'm using Access 2000 We have a very old sticker printer on a...
3
by: TDIOwa | last post by:
I have a report printing form (Access 97) in which I print different reports from. I have added a combo box that selects the number of copies that I want to print. Here is the rub... The...
2
by: Will | last post by:
I have a 1 page report which I want to print numerous copies of. The number of copies will be specified by the user. My problem is that I want each report to print the copy number of number of...
3
by: Saintor | last post by:
I have a record with with a quantity value. I have to print one record for each quantiy with a counter, incrmementing on each copy. I wan't to avoid to use many docmd.openreport instructions. ...
4
by: Rebecca Smith | last post by:
I'd like to print mailing labels. Simple enough eh? In the db I just took over, the previous fellow had some names listed multiple times, if those folk got more than one copy of the our monthly...
11
alpnz
by: alpnz | last post by:
Hi, I am sure someone has managed this one before. I have a report, which I call from a button on a form, which invokes the printing of 4 copies of a report. I would like to have a box on the...
5
by: Dave Richardson | last post by:
Hi, I'm having a nightmare trying to use a form as the basis of capturing the number of copies that a user requires of a report to be printed. I originally used the input box as a solution, but...
12
by: eyalco | last post by:
I have a report which I need to copy in 2 different lables. I've set a table with numbers from 0-10 (0 gets "original and all the others get "copy"). The caption is changed by IIF - so now all is ok....
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.