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


Using a Combo Box in a Form in an Access ADP

Using a Combo Box in a Form in an Access ADP

Using a Combo Box in a Form in an Access ADP

I need to make a report more flexible, so that users can get the specific data that they need.  The front end is an Access ADP, on a SQL backend.  

I want to use combo boxes that use a table for lookup, so the users can make their choices, and I don't have to write a data validation routine.

The form containing the combo boxes, runs an event procedure that opens a report, and the data source for it is a view.

How do I get the view to recognize the combo box values as part of the query?

Time is of the essence, and I would say that I'm a novice at best, when it comes to ADP's and SQL.

Thanks in advance.

RE: Using a Combo Box in a Form in an Access ADP

There may be other ways but here is what I would do...

Make a Stored procedure to select values for your report (an inline user-defined function would work too but I would only bother if doing the same for a form instead of a report).  If you want you could select everything from the view.

Next in the criteria column specify parameters. much like you would in the Jet QBE except that parameters begin with the at symbol '@' and do not have square bracketes around them.

Finally on the report's properties, specify input parameters...

@Paramater1 = Forms!Formname!comboBox1, @Parameter2 = Forms!Formname!comboBox2

Note worthy is the fact that just yesterday I was trying to specify input parameters on sub reports and could not indirectly reference the parent form (Me.parent!Field) so I ended up using the whole reports declaration (Reports!Reportname!Control).  Not as portable as I would like but functional.

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! Already a Member? Login

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