need help for label printing

G

Guest

hi

I need ur help in my program to print the labels,
this is my table structure (For eaxmple)

orderno serialno

101 1
101 2
101 3
101 4
101 5
102 1
102 2
102 3
102 4
102 5

using this table i have to print the labels with the following conditions

first it should prompt for Orderno ...

then it ask for the starting serial no and ending serial no for the
particular
orderno entered previously to print the labels

the serialno that came under the above selected limits must be able to print.

then it prompt for "no of copies to print".

finally it print the labels.

i have written a code , but it does not lookup the values based upon the
orderno
can u plz provide me the code to print this label.

regards
niyaz

(e-mail address removed)
 
A

Allen Browne

So you want to print (say) 2 copies of the label for orderno 101 serialno 1,
and then perhaps 6 more labels for orderno 101 and seialno 2, and then...?

If so, I think it would get annoying answering that dialog for every entry.
Consider adding another field to your table to store how many of each label
you want, e.g.:
orderno serialno Quantity
101 1 2
101 2 6
101 3 1
101 4 99
101 5 7
102 1 15
102 2 1
...

You can then use the technique explained in this article:
Printing a Quantity of a Label
at:
http://allenbrowne.com/ser-39.html
 
G

Guest

hi allen

i am new to the access programing ,so i am quiet struggling in this situation


I need your help to give a sample code for the following situation, As i
have tried other ways i can't get it.

this is my table structure (For eaxmple)

workorder serialno

101 1
101 2
101 3
101 4
101 5
102 1
102 2
102 3
102 4
102 5

using this table i have to print the labels for the following situations:

1.it should prompt for workorder:
(each workorder have 5 to 10 serial no here i have given 5 serial no's for
single workorder for example)

2.secondly it prompts for "Staring serial no" & "ending serial no".This
is because

for example :: if i enter starting serialno = 2 & ending serial no=5

it should only print the labels for the serialno starting from 2 to 5 for
the corresponding workorder that is entered in the first step (i.e) 2,3,4,5


3.lastly it prompts for "no.of copies to print for the above selected serial
no's"


plz give me some solutions.Whether this condition is possible or not.
 
A

Allen Browne

1. Set up tblCount, as described in this article:
http://allenbrowne.com/ser-39.html
You can enter the records manually, or use the code in that link to add the
records if you wish.

2. Create a query.
Add both your table and tblCount.
Make sure there is no line joining the 2 tables in the upper pane of the
query design window.

3. Drag the WordOrder field into the grid.
In the Criteria row under this field, enter:
[workorder number]

4. Drag the serialno field into the grid.
In the Criteria row under this field, enter:
Between [minimum serial number] And [maximum serial number]

5. Drag the CountID from tblCount into the grid.
In the Criteria row under this field, enter:
<= [how many of each label]

6. (Optional). Choose Parameters on the Query menu.
Access opens a dialog asking for the parameters and types.
Enter 4 rows for the 4 parameters, e.g.:
[workorder number] Long
[minimum serial number] Long
[maximum serial number] Long
[how many of each label] Long
(I am assuming here that workorder and serialno are both Number type fields,
not Text type fields.)

7. Save and close the query.

8. Open your report in design view.
Set its RecordSource property to this query.
(RecordSource is on the Data tab of the Properties box.)
 
G

Guest

Thanks for your help allen, it works ,but the main thing is the First step .

which is the First Step of my condition:

1. Firstly, it should prompt for workorder number.(i.e) if we enter 101

it should only print the serial no's for the workorder 101 that is entered
and not for all other workorders.

my aim is to get the reports for the particular Workorder entered .

2.Secondly is it possible to prompt for "How many copies to print" in the
application

instead of predefining the quantity inside the table as u advised earlier.



Thanks & regards
Niyaz


--
 
A

Allen Browne

A1. One workorder only.
The query I suggested does that.

A2. Prompt for the number of copies.
The query I suggested does that.
 
G

Guest

Hi allen

yes it s working for single WorkOrder but it does not Prompt for it
and also it does not prompt for No.Of copies to print

this is my Query Design: Whether any problem in Query design

here i have given Criteria for Countid <=10 (Since it doesnot Prompt i
have given
<=10)

field CountID WorkOrder SerialNo
table tblcount tblData tblData
Criteria <= 10 "101" BetWeen 1 & 10

plz suggest me anything to be modify in this query (to Prompt for both
Workorder & No.of Copies)

Thanks & Regards
Niyaz
 
A

Allen Browne

You did not enter the query criteria as I suggested.

Enter the name (not literal numbers) as suggested, including the square
brackets.
 
G

Guest

dear allen

as i have already got suggestions from your side for the past conditions,
now there s a critical conditions to be newly wriiten for that label , can
you plz give me some codes to print this label..

my table :

workorder Quantity in serialNo StartingSerialno

101 20 1
102 30 1
103 25 1
104 50 1

Table structure:

1.the quantity(Serial no) field for the particular Workorder which is fixed.

2.the StartingSerialno field all the values are set to 1 Default.
(changes whenever user enter the StartingSerialno which are above the stored
value)

condition:

1.promt for WorkOrder : 101

2.prompt for starting Serial no : 10

here if a user enter the value 10, then it should be saved in the database
for the StartingStartingSerialno field. whenever the user changes the
starting serial no , if it is above the stored value in d/b it should be
saved in the database.


3. promt for ending serialno: 20

4. promt for no of copies : 2

print label.
note : this example is for First time changing the Starting serialno from
default 1 to 10.

since the Quantity for the WOrkorder is 20 , the user can enter the
follwing

startingserial no =10
ending serialno= 20


everytime the startingserialno changed by the user the quantity remains same
for the workorder and the Quantity must synchronise with the changed
StartingSerialno

then it should print with workorder 101

with the serial from 10 to 20 in the label report.

the above example is first time changing the S'Serial no

after update my table :

workorder Quantity in serialno StartingSerialno

101 20 10
102 30 1
103 25 1
104 50 1

main thing is that when another user take the print out ,he cannot enter
the startingSerialno below 10 for the

same workOrder 101

and it is understood that user can print label with

starting serialno 10
ending serialno 30

no of copies 2


plz give me some codes to manipulate this ,Hope u understand my conditions
in the table.

regards
Niyaz

(e-mail address removed)
 
A

Allen Browne

I don't think there is anything I can add to the advice I have already
given.

Time for me to move on to other threads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top