Concatenation problem




I have a very useful popup form with ten text boxes.

In the control source of the first text box i have the following :

=[grade] & " : " & [ branch0] & "" & IIf([size]<19;" cartons ";" drums ")


In the control source of the second text box i have the following:

=[grade] & " : " & [ branch1] & "" & IIf([size]<19;" cartons ";" drums ")

In the control source of the third text box i have the following:
=[grade] & " : " & [ branch1] & "" & IIf([size]<19;" cartons ";" drums ")

etx. etc.

The above code is working for all the nine cases except the first, when i have branch0.In this case i receive the error "Name?"
Obvisouly it is the 0 in the first case that is the problem. If i cannot find a way to improve my code, then it will work for all the nine branches
except the first,but i would like to improve also the first case which has branch = 0. Is it possible to correct it at all ?

The above popup form helps me to show the current available quantity of each product being chosen to issue an order.Depending on the size
of the product it is written drums or cartons.I recommend it to everybody that has an order form. But you should avoid the 0,as in my case.
I will be grateful to anybody that might help me solve my little problem.

P.S. grade means name of the product, for example Cherry,apple, etc



Comments


  • : I have a very useful popup form with ten text boxes.
    :
    : In the control source of the first text box i have the following :
    :
    : =[grade] & " : " & [ branch0] & "" & IIf([size]<19;" cartons ";" drums ")
    :
    :
    : In the control source of the second text box i have the following:
    :
    : =[grade] & " : " & [ branch1] & "" & IIf([size]<19;" cartons ";" drums ")
    :
    : In the control source of the third text box i have the following:
    : =[grade] & " : " & [ branch1] & "" & IIf([size]<19;" cartons ";" drums ")
    :
    : etx. etc.
    :
    : The above code is working for all the nine cases except the first, when i have branch0.In this case i receive the error "Name?"
    : Obvisouly it is the 0 in the first case that is the problem. If i cannot find a way to improve my code, then it will work for all the nine branches
    : except the first,but i would like to improve also the first case which has branch = 0. Is it possible to correct it at all ?

    You sure the [branch0] has the value of 0?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion