By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Class Grades

P: n/a
I have about 7000 student records of college entrance exam records. i want to
build a form where I can select a range of scores in a combobox and return a
list of students with scores in the selected range. The ranges will be <600,
600-700, 701-800,801-900,901-1000, 1001-1100,1101-1200,>1200. I need some help
on how to get the selected range into the form's query.

Thanks for everyone's help!

Jackie
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Jackie" <jk******@earthlink.net> wrote in message
news:K4******************@newsread2.news.atl.earth link.net...
I have about 7000 student records of college entrance exam records. i want to build a form where I can select a range of scores in a combobox and return a list of students with scores in the selected range. The ranges will be <600, 600-700, 701-800,801-900,901-1000, 1001-1100,1101-1200,>1200. I need some help on how to get the selected range into the form's query.


1) Place 2 unbound controls on the form and create a subform with a record
source that uses those control to select the records. Place a button to
refresh the query.

2) Create a table with one field for each high and low value. Place a
combo box on the form showing one of the values, and the query to use the
select range.

hth,

Tim Mills-Groninger
Nov 12 '05 #2

P: n/a
"Jackie" <jk******@earthlink.net> wrote in message news:<K4******************@newsread2.news.atl.eart hlink.net>...
I have about 7000 student records of college entrance exam records. i want to
build a form where I can select a range of scores in a combobox and return a
list of students with scores in the selected range. The ranges will be <600,
600-700, 701-800,801-900,901-1000, 1001-1100,1101-1200,>1200. I need some help
on how to get the selected range into the form's query.

Thanks for everyone's help!

Jackie


Build a valid where clause in your unbound form (the one you use to
choose the range you want to see) and then pass that to the form in
the Open event.

you could have a combobox with 2 columns on your formA:

"<600";"<600";
"BETWEEN 600 AND 700";"600-700";
....

And then your form would just have an open argument...

strSQL = "MyScore " & Forms!FormA!cboLimit
DoCmd.OpenForm "MyForm", strSQL
Nov 12 '05 #3

P: n/a
"Jackie" <jk******@earthlink.net> wrote in message news:<K4******************@newsread2.news.atl.eart hlink.net>...
I have about 7000 student records of college entrance exam records. i want to
build a form where I can select a range of scores in a combobox and return a
list of students with scores in the selected range. The ranges will be <600,
600-700, 701-800,801-900,901-1000, 1001-1100,1101-1200,>1200. I need some help
on how to get the selected range into the form's query.

Thanks for everyone's help!

Jackie

Something like this, maybe?

Private Sub Command4_Click()
Dim strFilter As String

If IsNull(Me.txtHighScore) Then
strFilter = "Score > " & Me.txtLowScore
ElseIf IsNull(Me.txtLowScore) Then
strFilter = "Score < " & Me.txtHighScore
Else
stfilter = "Score BETWEEN " & Me.txtLowScore & " AND " & Me.txtHighScore
End If

DoCmd.OpenForm "frmScores", acNormal, , strFilter, acFormReadOnly
End Sub
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.