Radio Control Buttons

G

Guest

I have a form that has radio control buttons in three groups. I have
writtent the following script to keep the button groups separate. When I run
it I keep getting a message that says: Expected end of statement Line no. 2.
I am new to this. Any help would be appreciated.
Here is the script.
Sub Item_Open(Brokerage21305)
set OptionButton1 = Item.Gender Audience.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton1")
set OptionButton2 = Item.Gender Audience.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton2")
set OptionButton3 = Item.Gender Audience.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton3")
set OptionButton4 = Item.Unit of Sale.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton4")
set OptionButton5 = Item.Unit of Sale.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton5")
set OptionButton6 = Item.Unit of Sale.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton6"
set OptionButton7 = Item.Audience.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton7")
set OptionButton8 = Item.Audience.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton8")
set OptionButton9 = Item.Audience.New/Rev. Client/Prospect
Company("P.2").Controls("OptionButton9")


OptionButton1.Caption = "Female"
OptionButton2.Caption = "Male"
OptionButton3.Caption = "Both"
OptionButton1.GroupName = "Gender Audience"
OptionButton2.GroupName = "Gender Audience"
OptionButton3.GroupName = "Gender Audience"
OptionButton4.Caption = "Hi Ticket"
OptionButton5.Caption = "Low Ticket"
OptionButton6.Caption = "Mid Range"
OptionButton4.GroupName = "Unit of Sale"
OptionButton5.GroupName = "Unit of Sale"
OptionButton6.GroupName = "Unit of Sale"
OptionButton7.Caption = "Consumer"
OptionButton8.Caption = "Business"
OptionButton9.Caption = "Both"
OptionButton7.GroupName = "Audience"
OptionButton8.GroupName = "Audience"
OptionButton9.GroupName = "Audience"


End Sub
 
S

Sue Mosher [MVP-Outlook]

This is a custom Outlook form? (You posted in the VBA group, not the forms group.) Looks like you're not using the right syntax to refer to a control on the form. see http://www.outlookcode.com/d/propsyntax.htm#unbound

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top