populating fields with if?

teiben

Registered User.
Local time
Today, 20:40
Joined
Jun 20, 2002
Messages
462
I have a form with fields plant (combo with 5 possible values) and ccost.

I've had to add 5 fields fcost, ccost, bcost, gcost and scost.

I need to populate either fcost, ccost, bcost, gcost and scost to populate depending on the value of the fields plant and cost. What would be the syntax? text box I suspect w/if statement?

Any help would be greatly appreciated.

Thank you
 
HI

I would put an event procedure on the afterupdate event of plant or cost.

Something along the lines of:

If plant = f
fcost = cost
elseif plant = c
ccost = cost
elseif plant = b
bcost = cost
elseif plant = g
gcost = cost
else
scost = cost
endif

Obviously you need to have the correct logic, and mayce an "if then elseif endif" is not the most efficient.

I hope this points you in the correct direction,

Sue
 
Why 5 separate fields?
 

Users who are viewing this thread

Back
Top Bottom