IIF statement that returns TRUE a field in a textbox

AConrad00

Registered User.
Local time
Today, 14:41
Joined
Aug 21, 2012
Messages
15
Hi All,

I have a form that runs a sequence of queries that returns a number value (1,2,3... in sequential order). I want to take that number, and turn it into an IIF statement, that returns the TRUE field to be a text box that the user can input text into to 'custom' name that particular number.


For instance

1 = Offer1Name
2 = Offer2Name

etc

In Design view of my Select Query, In the FIELD cell, i am inputting the following:

IIF ([Min_Sequence Code] = 1, [Forms]![ListBuild]![Text_Offer1Name], "Error")

and it is not picking up the field.

Any Ideas? I tried adding '" '" around the form input, but it did not help. The error is in there just to spotcheck, and will later go all the way up to 10 different IIF statements linked together.

Thanks!
 

Thanks J

I was looking through this and I cannot find an instance where an unbound textbox is referred to as either the true/false return in an IIF statement

I will play around with it today more. As I've come to learn, it's probably very simple and i'm just missing the obvious!!
 
Okay so I found a very easy workaround

It definitely is not as "pretty", but this works well and is simple.

I just created a subform that populates a table that connects the order_sequence number with the user-input typed in name, and it's as simple as creating an additional query to create that join.

I'd still like to see if anyone has any other ideas, but this is a simple solution that is not perfect, but works great.
 
As for the syntax you don't need the full reference to the control, you only need the name of the textbox.
 

Users who are viewing this thread

Back
Top Bottom