If statement based on values in subform

jboyle

New member
Local time
Today, 15:36
Joined
Nov 18, 2000
Messages
53
I have a main form that contains a subform. One of the fields in the datasheet subform is part number. If any of the listed part numbers begins with 84 (84272451F) then I want a text box on the main form to state EXPORT. If none of the part numbers begin with an 84 then I want the text box to state DOMESTIC.
Any help would be appreciated - John
 
Try this...

Text3 = IIf(DCount("*", "PartNumbers tbl", Left([PartNo], 2) = "84") > 0, "EXPORT", "DOMESTIC")

(My example table is called "PartNumbers tbl" and part numbers stored in field "PartNo".)

hth

shay :cool:
 

Users who are viewing this thread

Back
Top Bottom