IIf Help

jbphoenix

Registered User.
Local time
Today, 14:16
Joined
Jan 25, 2007
Messages
98
I have a text field in a table containing ID's. The ID's look like this -

1234
R25466
RMA987456
C87546

I am trying to create a query to strip off the letters. Here is what I have right now -

Expr1: IIf([test2]="A" Or [test2]="C" Or [test2]="F" Or [test2]="H" Or [test2]="R",Mid([ID],2),[ID])

Expr2: IIf(Left([ID],3)="RMA",Mid([ID],4),[ID])

When I run the query I get the results I need but I would like to have it all in 1 field. When I tried to combine the formula's and then run the query again all I get is -1. Any help would be greatly appreciated. Thanks
 
Replace the false part of the first IIf with the entire second.
 

Users who are viewing this thread

Back
Top Bottom