Hi,
say you have a report called MyReport
create a new form wth mentioned textboxes
modify your report rowsource, so criteria based on workorder textbox, serail
from-to textboxes (you can easy do this using expression builder (build
button))
add a command button Print on your form
add code to it click event:
docmd.SelectObject acReport,"MyReport",true
docmd.PrintOut acPrintAll,,,,me.NumberOfCopies
You could also add some verification that user enter proper values in
mentione textboxes
HTH

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> hi alex
>
[quoted text clipped - 62 lines]
>> > regards
>> > riyaz
riyaz - 16 Jan 2006 06:17 GMT
Dear alex
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
riyazny@gmail.com
riyaz - 16 Jan 2006 09:46 GMT
hi alex
can you plz provide me the Code for the following condition( Newly modified)
table structure:
workorder Quantity in serialNo StartingSerialno
101 20 1
102 30 1
103 25 1
104 50 1
all the Starting Serial no is set 1 Default,(if I change this 1 in future to
some values ,it should Shynronize with Quantity (Maximum limit of ending
Serial no).
Prompt For Workorder: 101
promt for Staring Serial no: 2
Promt for Ending Serial no: 20
no .of copies : 1
then it should Print like this
101 101 101 101 101 101 ......101
2 3 4 5 6 7 20
plz make note that the field Quantity in Serial no is the maximum limit for
Ending Serial no ;
in the above Example i have given the value (Starting Serialno) 2 to
20(Ending Serial no)
thanks & Regards
Niyaz
riyazny@gmail.com
Alex Dybenko - 16 Jan 2006 15:49 GMT
Hi,
not clear what data you need to print with your labels
but I thinking that you need to make a table with one field, fill in with
numbers from 1 to 50
then make a query, where define criteria, in your case Serial between 2 and
20, also add workorder number
now you can run a labels report based on this query
HTH

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> hi alex
>
[quoted text clipped - 37 lines]
>
> riyazny@gmail.com
riyaz - 17 Jan 2006 09:41 GMT
hi alex
i cannot get you, can you plz write a criteria for the below conditions:
i need more help from you for this condition, As i am new to programming i
feel quiet hard.
the actual condition is the following:
this is my table structure:
workorder StartingSerialno Maximum EndingSerialno
101 1 20
102 1 30
103 1 25
104 1 80
By Default aal Starting Serial No is 1 .
For Example if a user run the report
it will prompt for WorkOrder === 102
prompt For Starting Serial No === 6
prompt For Ending Serial no === 10
(Every Time user enter Different Starting Serial no & Ending SerialNo)
prompt for number of copies === 2
Example Result:
it should have result like this:
102 102 102 102 102 102 102 102 102 102
6 6 7 7 8 8 9 9 10 10
waiting for your reply
Thanks & regards
niyaz.
riyazny@gmail.com
Alex Dybenko - 17 Jan 2006 13:03 GMT
if you would use table (tblSerail) from my previous post, and form with
criteria entry called frmEntry - then query SQL will look like
Select Forms!frmEntry!WorkOrder as WorkOrder, SerialNo From tblSerial
Where SerialNo between Forms!frmEntry![Starting Serial No] and
Forms!frmEntry![Ending Serial no]
HTH

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> hi alex
>
[quoted text clipped - 40 lines]
>
> riyazny@gmail.com
riyaz - 18 Jan 2006 06:22 GMT
dear alex,
thanks for your help in your previous Suggestion .It Helped me.
Now i need some simple report format as mentioned below.
I need to get the label print out with some conditions.
same table structure:
workorder StartingSerialno Maximum EndingSerialno
101 1 20
102 1 30
103 1 25
104 1 80
prompt for Workorder: 101
prompt for Starting Serialno : 2
prompt for ending Serialno : 15
( I also need to Display Error message if ending Serialno exceeds the
maximum limit in the table)
output Result: simple format which has just sartingserialno & Ending
Serial no as entered only.
101
2 to 15 ( to -- Actual text in the report)
the above report is only to know the limits of the serialno's.
regards
Niyaz.
Alex Dybenko - 18 Jan 2006 06:32 GMT
Hi,
try to make a multi-column report - I think this is what you need
or try to run a label report wizard, based on this query

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> dear alex,
>
[quoted text clipped - 31 lines]
> regards
> Niyaz.
riyaz - 18 Jan 2006 08:17 GMT
hi alex
i have done it, just by creating unbound text box in the report with the
control source [starting Serial no] and [ending Serialno].
plz help me , how to give error message or warnings, when
the EndingSerialno exceed the limit .
plz advise me , give some sample codes to generate error message or warnings
in the report..
now my report only shows #error .when i enter the EndingSerialno above the
limit.
regards
Niyaz
Alex Dybenko - 18 Jan 2006 10:54 GMT
Tell me - did you already build a filter form and it produce correct query?

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> hi alex
>
[quoted text clipped - 14 lines]
> regards
> Niyaz
riyaz - 19 Jan 2006 00:51 GMT
hi alex
i don't build the filter form,but i have done it just writing a query itself.
Now , i want to have a warning or a error message to be generated whenever
the user enter the endingSerialno above the limit(Which is in the table).
plz help me, how to create a error message for this condition in the report.
Thanks & Regards
Niyaz
Alex Dybenko - 19 Jan 2006 05:21 GMT
you can not generate warning or error message using query parameters, that
is why I suggested you to build a form...

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> hi alex
>
[quoted text clipped - 10 lines]
> Thanks & Regards
> Niyaz