If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Unbound option group writing text values...
Hi,
I have an interesting and extremely annoying problem with my option group! I have setup an option group with 3 options; “Option 1”, “Option 2” and “Option 3”. These options are not bound to a field as the field must store these options in pre-determined text format and not numerical (i.e. 1, 2 or 3). Instead I have hidden the bound field “Signoff” and set the options depending on the value in this hidden field. I have done this through the forms ‘On Current’ event: Private Sub Form_Current() If Me.SignOff.Value = "Option 1" Then Me.OptionGroup = 1 ElseIf Me.SignOff.Value = "Option 2" Then Me.OptionGroup = 2 ElseIf Me.SignOff.Value = "Option 3" Then Me.OptionGroup = 3 Else Me.SignOff.Value = "" Me.OptionGroup = 0 End If End Sub In order to set the field to the option selected I have set the option button ‘On Got Focus’ event: Private Sub Option62_GotFocus() Me.OptionGroup = 1 Me.SignOff.Value = "Option 1" End Sub This works fine, except when I actually set an option button. When I set the first record’s option button to “Option 1”, the second option button is unaffected, however the third record’s option button, which was previously blank, is now being set to “Option 3” !?! Please help. Thanks in advance, Dave |
#2
|
|||
|
|||
Unbound option group writing text values...
hi Davie,
Davie P wrote: Private Sub Option62_GotFocus() Me.OptionGroup = 1 Me.SignOff.Value = "Option 1" End Sub This works fine, except when I actually set an option button. When I set the first record’s option button to “Option 1”, the second option button is unaffected, however the third record’s option button, which was previously blank, is now being set to “Option 3” !?! Wrong event, should be OnClick, cause GotFocus is also triggerd by tabbing through your options. -- stefan -- |
#3
|
|||
|
|||
Unbound option group writing text values...
Hi Stefan,
I am using Access 97 and the 'OnClick' event is not available for option buttons. Any further suggestions? Many thanks, Dave "stefan hoffmann" wrote: hi Davie, Davie P wrote: Private Sub Option62_GotFocus() Me.OptionGroup = 1 Me.SignOff.Value = "Option 1" End Sub This works fine, except when I actually set an option button. When I set the first record’s option button to “Option 1”, the second option button is unaffected, however the third record’s option button, which was previously blank, is now being set to “Option 3” !?! Wrong event, should be OnClick, cause GotFocus is also triggerd by tabbing through your options. -- stefan -- |
#4
|
|||
|
|||
Unbound option group writing text values...
hi Davie,
Davie P wrote: I am using Access 97 and the 'OnClick' event is not available for option buttons. Any further suggestions? KeyPress or KeyUp and MouseUp are available and should be a sufficent replacement. -- stefan -- |
#5
|
|||
|
|||
Unbound option group writing text values...
hi Davie,
i forgot: have you checked the option values of option 1 and 3. Are they different? -- stefan -- |
#6
|
|||
|
|||
Unbound option group writing text values...
Hi Stefan,
Yes, they are all unique. Dave "stefan hoffmann" wrote: hi Davie, i forgot: have you checked the option values of option 1 and 3. Are they different? -- stefan -- |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free text option | Mike | New Users | 2 | July 8th, 2004 03:40 PM |
form fields showing "form text" instead of values | Arget | New Users | 2 | June 9th, 2004 12:04 AM |
Linking group of Option Boxes to Drop-down list values | Bill Winkle | Worksheet Functions | 0 | May 6th, 2004 12:57 AM |
Converting Text to numeric values | MichaelStarman | Worksheet Functions | 5 | January 29th, 2004 07:56 PM |
Adding Option Buttons to a Group Box | Sandy | Worksheet Functions | 1 | September 28th, 2003 12:13 AM |