Making Serial in Form

A

aa

Thank you very much for your help and answer:
How do can I make serial for record on a form (1,2,3,4,5,6…etc) but when job
is infant don’t give this record serial and continue the serial with
previous serial
Example:
TxtSerial Name Job
1 A Dr.
2 B Eng.
0 C Infant
0 Q Infant
0 R Infant
3 W Mr.
4 O Dr.
5 T Eng
0 R Infant
0 P Infant
6 YY Eng
 
K

Kevin @ 3NF

You are going to need to run some code that check to see if job = "Infant",
and if not, it then sets txtserial to the maximum value + 1 (DMAX function
most likely).

This code could run from a variety of different places, depending on when
you want the criteria checked.
 
A

aa

Thank you for your help and answer::
Could you PLS help me using DMax Function.. and what code need to do this
serial
Thank you for your help and answer
 
M

Michel Walsh

Hi,

In a query:

TxtSerial: iif(Job='infant', 0, DCount("*", "TableNameHere", "Name<=""" & Name & """ AND Job
<>'Infant'))



Hoping it may help,
Vanderghast, Access MVP
 

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