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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control not associated with a table field

Status
Not open for further replies.

Rouslan

Technical User
Sep 7, 2002
27
CA
I'm trying to create an option group (those round controls) that will sort a continuous form based on the option selected, but it seems a control doesn't respond to user input if it's not associated with a table field. Is there an elegant (as apposed to adding an unnecessary field to a table) way to make it respond.
 
The control should respond to an order by, without being bound to a field. Perhaps you could try something like this:
Code:
Private Sub [i]FrameName[/i]_Click()
Select Case [i]FrameName[/i]
Case 1
  Me.OrderBy = "Field1"
  Me.OrderByOn = True
Case 2
  Me.OrderBy = "Field2, Field3"
  Me.OrderByOn = True
End Select
End Sub
 
It didn't work. The FrameName_Click() event doesn't fire unless the frame itself is clicked.


Also it doesn't matter but when I said sort, I meant filter.
 
I wonder why? I am using Access 2000 and the click event fires when I choose an Option from an unbound Option Group. What version are you using? [ponder]
 
How are ya Rouslan . . .

In the [blue]AfterUpdate[/blue] event of the [blue]option group frame[/blue], copy/paste the fiollowing:
Code:
[blue]   Me.OrderBy = Choose(Me![purple][b]FrameName[/b][/purple], "FieldName1", _
                                     "FieldName2", _
                                     "FieldName3", _
                                     "FieldName[purple][b]N[/b][/purple]")
   Me.OrderByOn = True[/blue]

Calvin.gif
See Ya! . . . . . .
 
Kick me. Just kick me really hard. My whole problem was I had "Allow Edits" set to no. Sorry about this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top