Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Filtering a Report based off forms combo box

Filtering a Report based off forms combo box

Filtering a Report based off forms combo box


I know how to filter reports via form combos but for some reason, a little glitch is happening, when i click the command button a pop up window appears asking to enter the paramater value, for example if i've selected May-13 for the combo box, the parameter pop up window will ask for "May", if i put in any number, the report will then run with the filter applied, so i'm not sure what's going on.

the combo box has:


SELECT tblAvailabilityMonths.strAvailabilityMnthDesc, tblAvailabilityMonths.lngAvailabilityMnthID FROM tblAvailabilityMonths GROUP BY tblAvailabilityMonths.strAvailabilityMnthDesc, tblAvailabilityMonths.lngAvailabilityMnthID ORDER BY tblAvailabilityMonths.lngAvailabilityMnthID; 

the command button to print the report has:


Private Sub Command38_Click()
 If IsNull([cmbMonthYear]) Then

        MsgBox "Apply a filter to the form first."

        DoCmd.OpenReport "Registers: Elswick", acViewPreview, , Me.cmbMonthYear
    End If
End Sub 

the query has: expr2: Format([TheDate],"mmm-yy"), then the criteria is [Forms]![frmAvailability1AElswickMain]![cmbMonthYear]

the report does work, i just need to get rid of this annoying pop up window


RE: Filtering a Report based off forms combo box

I would use the WHERE CONDITION of the DoCmd.OpenReport method.

What is the field in the report's record source that you want to use for filtering?
What is the data type of the field?

What column is bound in your combo box?
What are the values of the bound column of your combo box?

Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close