Serial in report

A

aa

Thank you for your help and answer....
I have report and to make serial I’m using This unbound control txtSerial:
Record Source =1
Running Sum = over all
And the report contain this Fields
TxtSerial Name Job
The unbound control put Serial for every record...what I want If Field Job
Contain
("Infant" or "Children") txtserial don't give Serial for
This record
For Example:
TxtSerial Name Job
1 A Dr.
2 B Eng.
0 C Infant
0 Q Children
0 R Infant
3 W Mr.
4 O Dr.
5 T Eng
0 R Infant
0 P Children
6 YY Eng

If Job .value contain ("Infant" or "Children") don't put Serial
Thank you for your help and replay
 
D

Duane Hookom

Set the Control Source to:
=Abs([Job] <> "Infant" And [Job] <> "Children")
If using Access 2000+ you could use Conditional Formatting. If not, use the
On Format event with code like:
Me.txtSerial.Visible = ([Job] <> "Infant" And [Job] <> "Children")
 
M

Marshall Barton

aa said:
I have report and to make serial I’m using This
unbound control txtSerial:
Record Source =1
Running Sum = over all
And the report contain this Fields
TxtSerial Name Job
The unbound control put Serial for every record...
what I want If Field Job Contain
("Infant" or "Children") txtserial don't give Serial for
This record
For Example:
TxtSerial Name Job
1 A Dr.
2 B Eng.
0 C Infant
0 Q Children
0 R Infant
3 W Mr.
4 O Dr.
5 T Eng
0 R Infant
0 P Children
6 YY Eng

Add another text box ...
Name: txtCounter
Expression: =IIf(Job IN("Infant", "Children"), 0, 1)
RunningSum: Over All

And change the txtSerial text box to ...
Expression: =IIf(Job IN("Infant", "Children"), Null,
txtCounter)
RunningSum: No

If you really want to display 0, then replace the Null above
with 0.
 
A

aa

Marsh
MVP [MS Access]
Thank you very much for your help and answer
Your solution work but there is one problem txtserial give job (infant and
children) hidden number and begin any job with last hidden number.
I will give you example for your solution:

Txtserail name job
1 a Dr.
0 b infant
0 c infant
4 Q Eng
0 T infant
0 F children
7 Y Eng.

What I want:
Txtserail name job
1 a Dr.
0 b infant
0 c infant
2 Q Eng
0 T infant
0 F children
3 Y Eng.
Thank you for you help
 
M

Marshall Barton

aa said:
Your solution work but there is one problem txtserial give job (infant and
children) hidden number and begin any job with last hidden number.
I will give you example for your solution:

Txtserail name job
1 a Dr.
0 b infant
0 c infant
4 Q Eng
0 T infant
0 F children
7 Y Eng.

What I want:
Txtserail name job
1 a Dr.
0 b infant
0 c infant
2 Q Eng
0 T infant
0 F children
3 Y Eng.

That looks like you still have the txtCounter
text box set to =1. As I suggested before, you
need to change that to:
=IIf(Job IN("Infant", "Children"), 0, 1)
 
D

Duane Hookom

I didn't see any nulls in your sample records. Try:
Me.txtserial.Visible = ([Job] & "" <> "infant" And [Job] & "" <>
"children")
 

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

Similar Threads


Top