Unbound option group question

MS Office Access


  • 1. how do i export a single record in an access2000 form to word
    hi ..i have a certificate picture with different members details superimposed into it in access forms...i cant seem to export a single record to word so that the client can get his own certificate record..any help or suggestion would be very much appreciated using access 2000
  • 2. Hide field depending on user ID
    I have a form with the following fields: [ID] [Requester] [QTY] and so on. I want to hide the fields [Approved] [Date approved] and [Received] with the following conditions. If the user does not belog to the support section located in [tables].[Personnel].[Duty Section] then the fields should be hidden. Any sugestions?
  • 3. Multiselect list problem
    Hi I am using the following get the items from a multiselect list; Dim ctl As Control For Each ctl In Me.BatchInvoicesList.ItemsSelected Problem is that I am getting a 'Object not found error'. Same with; For Each ctl In Me!BatchInvoicesList.ItemsSelected What am I doing wrong? Thanks
  • 4. Basing five combo boxes on one other combo box in an Access forms
    I know how to base one combo box on another. I would like to know how to base five combo boxes on one combo box and send that data to a table and/or a report. Example: When I enter a SSN number in one combo box, I would like the following columns to be populuated other combo boxes in a form mailing name five lines for mailing address salutation name Thank you very much, Bobbie Coats 215-895-2608 XXXX@XXXXX.COM
  • 5. Clearing textbox
    I have made a kind of search in my form where user puts text into unbound textbox. It's working allright and when the item is not found a messagebox appears saying :Item not found. But the item user wrote into that textbox stays, so how do I get it to clear when there's not an item found...? thanks if anyone... -elli-

Unbound option group question

Postby c3RldmUgYQ » Thu, 08 Jan 2009 23:55:02 GMT

I have a option group which is unbound as i use it to enter text via:

Private Sub optward_AfterUpdate()
    On Error Resume Next
    Me.[ward] = Choose([optward], "First Text", "Second Text", "Third Text", 
"forth text", "fifth text", "sixth text") please ignore text wrap

end sub

however since adding this code, when i use a command button to move onto the 
next new record the toggle buttons do not reset, and the selection remains. 
how do I reset the option group to be as a new entry?
Your help is appreciated as always, 

steve adlam

RE: Unbound option group question

Postby RGFsZSBGeWU » Fri, 09 Jan 2009 00:48:01 GMT

I'm not sure whether setting the option groups default value will change when 
you go to a new record or not, since it is not bound.  Try that first.

If that doesn't work, then in the forms Current event, set the value of the 
option group to whatever you want it to be.  You will also have to call the 
afterupdate event, as that won't fire when you change the controls value via 


email address is invalid
Please reply to newsgroup only.

RE: Unbound option group question

Postby c3RldmUgYQ » Fri, 09 Jan 2009 01:08:01 GMT

Hi dale
It's actually part of a cascade where i use the toggle buttons to filter a 
list box:
see complete code below. 

Private Sub optward_AfterUpdate()
    On Error Resume Next
    Me.[Ward] = Choose([optward], "Dalby", "Fenton", "Kirby", "Farndale", 
"Kyme", "Boston")
    Dim strCountry As String
    Select Case optward.Value
        Case 1
            strCountry = "dalby"
        Case 2
            strCountry = "fenton"
        Case 3
            strCountry = "kirby"
        Case 4
            strCountry = "farndale"
        Case 5
            strCountry = "kyme"
        Case 6
            strCountry = "boston"
    End Select
    lstpt.RowSource = "Select tblAll.name " & _
        "FROM tblAll " & _
        "WHERE tblAll.ward = '" & strCountry & "' " & _
        "ORDER BY tblAll.name;"
   End Sub

so when i click on my command button with code:

Private Sub combined_Click()
On Error GoTo Err_combined_Click
    Me.[DTstamp] = Now()
    Me.[User name] = CurrentUser
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    DoCmd.GoToRecord , , acNewRec
    Exit Sub

    MsgBox Err.Description
    Resume Exit_combined_Click

so when i click the "command button, the dat gets added fine, and the list 
box ends up blank.  However the toggle button stays in shadow and cannot be 
clicked again,  but the others can and the filter works fine, then the 
original toggle can be selected again.... 
I was hoping there would be some code i could put in with the command button 
to "refresh/reset" the option box toggles with out effecting anything else! 

Many thanks

steve adlam

RE: Unbound option group question

Postby RGFsZSBGeWU » Fri, 09 Jan 2009 01:30:03 GMT

Try adding a line like:

me.optWard = Null

after the gotorecord line in your command button click event.


email address is invalid
Please reply to newsgroup only.

"steve a" wrote:

RE: Unbound option group question

Postby c3RldmUgYQ » Fri, 09 Jan 2009 01:40:11 GMT

rilliant. works a treat..
Thank you very much!

steve adlam

"Dale Fye" wrote:

Similar Threads:

1.Option group value in an unbound text box.

I would like to create an option group with several checkboxes which 
populates a "text value" into an unbound text box on the same form.

I created the option group and the unbound text box.  I have tried creating 
IIf statements in the AfterUpdate Event for the option group, but can't 
figure out how to make it update the text box.  The only thing that shows in 
the text box is #error

2.Option control group unbound

I have a group control that has 8 option buttons and is not bound to the 
table. if one of the option buttons is selected how do I know which one? do I 
check the group of each option button. I have not found in the group where 
the result would be nor have I found where the result would be in the 
individual option.

3.Unbound option group

Hi all,

I have created an unbound option group of radio buttons.  However, the
buttons are displayed as grey, and I can't select any of them.  Making the
frame default value equal to one of them, has it selected upon form load,
but still I can't select any other choices.

What have I missed?


4.Referencing Unbound Option Group in Query

I have a form I'm using to collect data to search a table.  One field is 
called "DateComp" data type of Date.  I don't want to use actual dates to 
search by, simply provide an Option Group with "Completed", "Open" (value of 
2) or "All".  The Option Group "Status_Grp" is unbound since the data type of 
the underlying field is different.

In the query the criteria for the DateComp I've tried:

IIf([Forms]![1_Main]![Status_Grp]=2,"Is Not Null")
IIf([Forms]![1_Main]![Status_Grp]=2,"Is Null")

For testing purposes I'm trying to match just one of the fields, if I can do 
that, nesting will be easy hopefully I'm running out of hair.

I've tried with and without quotes, tried adding Like in front.  All results 
yield zero records.  This is the only criteria in the query so far.  Am I not 
referencing the group correctly?


5.Unbound option group writing text values...


I have an interesting and extremely annoying problem with my option group! 

I have setup an option group with 3 options; ption 1 ption 2and 
ption 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 ignoffand set the options 
depending on the value in this hidden field. I have done this through the 
forms n Currentevent:

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
    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 n Got Focusevent:

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 option button to ption 1 the second option button is 
unaffected, however the third record option button, which was previously 
blank, is now being set to ption 3!?!

Please help.

Thanks in advance,

6. Unbound option groups and form's RecordSource in Access 2007

7. Another Unbound Form with Option group Problem

8. Passing info from unbound option group to table fields

Return to MS Office Access


Who is online

Users browsing this forum: No registered users and 42 guest