Duane Hookom (MVP)

A

aa

Duane Hookom (MVP)
Thank you very much for your help and answer:
I have Field Name ID (Autonumber Field) and I arrange the records by using
This Field (ID=Autonumber) So the sort order will be 1,2,3,4 for ID Field..
So I hope to make EXP to ignore infant and give serial for any records.
Thank you for your help and answer:
Example:
ID SerialEXP Name Job
1 1 A Dr.
2 2 B Eng.
3 0 C Infant
4 0 Q Infant
5 0 R Infant
6 3 W Mr.
7 4 O Dr.
8 5 T Eng
9 0 R Infant
10 0 P Infant
11 6 YY Eng
 
M

MDW

-----Original Message-----
Duane Hookom (MVP)
Thank you very much for your help and answer:
I have Field Name ID (Autonumber Field) and I arrange the records by using
This Field (ID=Autonumber) So the sort order will be 1,2,3,4 for ID Field..
So I hope to make EXP to ignore infant and give serial for any records.
Thank you for your help and answer:
Example:
ID SerialEXP Name Job
1 1 A Dr.
2 2 B Eng.
3 0 C Infant
4 0 Q Infant
5 0 R Infant
6 3 W Mr.
7 4 O Dr.
8 5 T Eng
9 0 R Infant
10 0 P Infant
11 6 YY Eng

So...all you want to do is exclude records where the Job
is "Infant"? Try this:

SELECT [SerialEXP] FROM [TableName] WHERE Job<>'Infant'
 
M

Michel Walsh

Hi,

In a query:

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



Hoping it may help,
Vanderghast, Access MVP
 
A

aa

Vanderghast, Access MVP
Thank you for your help and answer:
This error message box appear when copy the code and paste it in query grid
and after that select this
part of code **** "and [Job]<>'Infant' *****
But all previous code is very good..
I try many time to do any thing but not work
The message box is
 
M

Michel Walsh

Hi,


You need a space before the a of and.


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