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

Need to create Option Group with numbrs and letters

Status
Not open for further replies.

phweston

Programmer
May 8, 2003
38
0
0
I have an Option Group on a form with letters of the alphabet. When you click a letter, and list appears in a box to the right. I want to add the numbers 1-9 to the list of letters as well.

Here is the code:

Set R = CurrentDb.OpenRecordset(SQLText)
For Button = 1 To 26
With Me("Toggle" & Button + 1)
.Caption = Chr(Button + 64)
.OptionValue = Button + 64
End With
R.FindFirst R(0).Name & "= '" _
& Chr(Button + 64) & "'"
If R.NoMatch Then
'Me("Toggle" & Button + 1).Enabled = False
End If
Next
Me![ButtonFrame] = 65


According to the Character set list, A-Z is represented by 65-90, where as numbers are represented by 48-57.When I added the nubmers at first,

How do I add to the Button frame The Numbers 1-9, so that when each one is clicked, the Box to the right shows results beginning with each number?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top