Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defice text from control

Status
Not open for further replies.

BillyL

IS-IT--Management
Jul 18, 2000
91
US
In my form I have an option box with two radio buttons: optPriv(value=1) & optPub (value=2). The control souce is the PrivPub field in the table. What I am trying to do is to have text displayed in the form header depending on which radio buttonis selected. If optPriv is selected I want the text in the header to read "Private". If optPub is selected I want the text to read "Public". I tried and expression but it is not working. The expression is: IIf([optPriv]=true,"Private",Public"). When I view the form the text reads #name?. What am I doing wrong?

Thanks!
 
Try using the option group to check the value rather than the option buttons. For example, suppose the option group name is "framePrivPub". Then the ControlSource of the text box in the form header would look like this:

ControlSource... =IIf([framePrivPub]=1,"Private","Public")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top