Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Open a report with a value from a form
Don Wright 
    
13 years ago
Richard,
I have a form set up (continuous) and in the header I have combo boxes set up to do searches.  I can select a Description, or Account Name, or SubAccount Name, push my Search button and the form shows me the results.  Works great.  The combo's names are DescSearchcbo, AccountSearchcbo, and SubaccountSearchcbo.

I have another button to open a report based on the forms underlying query, so I get a nice clean report showing how much I spent at the Piggly Wiggly, or by the Groceries acct, etc.  The report opens up and shows the filtered results beautifully.

The problem is this: I have a label the says "Search Results for:" and a text box next to it (SearchTitletxt).  I want this text box to display the value from whatever combo I picked to base the report on.  So if I used the DescSearchcbo to search for Piggly Wiggly, you would see "Search Results for: Piggly Wiggly" when the report opens (or the acct name, etc).

I've put my code in the on click event to open the report, but I keep seeing "can't find SearchTitletxt".  I placed it in the On Open event, but get a dialog box saying "Enter Parameter".
Here is my code:
If Forms!RegisterF!PayeeSearchcbo.Value > "" Then
        Me!SearchTitletxt.ControlSource = Forms!RegisterF!PayeeSearchcbo.Column(1)
    End If

I think this has something to do with loading the value befor the report is "created".  Or I'm just a little loopy.

Can you advise me on this please?

Thanks,
Don



Reply from Richard Rost:

Report timing is funny like that. Try going the other way. Put an unbound text box in your report that reads the value off of the form. Control source =

=IIF(IsNull(Forms!RegisterF!Combo),"",Forms!RegisterF!Combo)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 4:24:23 AM. PLT: 1s