Here is the total code.VB Code:
Dim strGenre As String Dim strPlatform As String Dim strFilter As String 'if the value in this combo box is null, then show all records If IsNull(Me.cboGenre.Value) Then strGenre = "Like '*'" Else strGenre = "='" & Me.cboGenre.Value & "'" End If 'if the value in this combo box is null, then show all records If IsNull(Me.cboPlatform.Value) Then strPlatform = "Like '*'" Else strPlatform = "='" & Me.cboPlatform.Value & "'" End If 'combining criteria to form a WHERE clause strFilter = "[Genre] " & strGenre & " AND [Platform] " & strPlatform With Reports![rptTopRented] .Filter = strFilter .FilterOn = True End With
The bit I want to change to allow the numerical data is:
VB Code:
Else strPlatform = "=' " & Me.cboPlatform.Value & " ' " End If
The combo box names 'cboPlatform' is a list of Number ID's. And since currently its interperated as text, I've been told to maybe adjust or take out the qualifiers (I dont know what a qualifier is) in that bit of code to cater for numerical data.
Also, I have a code, where, I want select a field (which has numbers too) and simply show ONLY the HIGHLEST value. What do I need to add to this code in order to do this?
VB Code:
strFilter = "[Genre] " & strGenre & " AND [Platform] " & strPlatform
help ASAP appreciated. Project due tommorro!




Reply With Quote