×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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!

*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

Use combo on form's tab page as query criteria

Use combo on form's tab page as query criteria

Use combo on form's tab page as query criteria

(OP)

I'd like to put a combo onto a page of a tab control on frmMenu, select a combo item and run a report for it.

I'm using forms!frmMenu.cboType as the criterion for the report's query source qryAddressesByType, but it comes back with error 'can't find the object qryAddressesByType'.

There's a different error message if trying to run the query directly, where it says 'Enter Parameter Value, asking for Forms!frmManu.cboType.

Searching for an explanation a Microsoft source says all objects on a tab page are like any elsewhere and to reference them the same way. What am I missing?

RE: Use combo on form's tab page as query criteria

Do you set your "report's query source" in code? If so, could you share your code here?


---- Andy

There is a great need for a sarcasm font.

RE: Use combo on form's tab page as query criteria

Is the combo box on a subform or just the tab on the main form?

What is the SQL view of the report's record source?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Use combo on form's tab page as query criteria

(OP)
I'm starting with a blank frmMenu that I wanted to be a replacement for the normal Switchboard.

With this simple form it's easy to add several command buttons to call up things normally reached by the Switchboard. I was looking to go a stage further and have a set of tab pages for different groupings of items called up, so things related to Orders, Customers, Addresses, Products etc.

On the Addresses page I tried to add a combo to save space for one of the sub-groupings but got the error below when trying to call up qryAddressesByType, whether using the combo's AfterUpdate or directly via a command button



The query opens correctly using the Nav Pane.

RE: Use combo on form's tab page as query criteria

Did you try to run the query directly with the frmMenu open and something selected in the combo box?

How about providing the record source of the report?

What is your code to open the report?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Use combo on form's tab page as query criteria

(OP)
Yes, tried this and it opened correctly. Now I'm starting to feel embarrassed because after reworking the combo and its AfterUpdate it's now working correctly, both for the query and then changing to call up the report based on it.

Huge apologies for wasting your time.

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