599CD.com 01/01: Happy New Year   Collapse Menus
 
 
New Releases:  Access RecordsetsActive Server PagesPowerPoint dismiss
 
   
 

What's New?  |  Courses  |  Theater  |  Demo  |  Tips  |  Blog  |  Forums  |  Search  |  Help  |  Order

 
 
New Tips Added Weekly. Get Notified of New Tips & Tricks.
 
     
 
Tips & Tricks
   

  Access   Excel   Word   Windows   FrontPage   Hardware   Misc

 
 

Get a Value from an Open Form Field

Using Forms!FormName!Field Notation To Read a Form Value

Q: How can I run a report showing just orders from a specific customer - preferably from the customer record that's currently open on my screen?

A: In order to do this, you have to build a query limits its results based on the currently open customer on the customer form. Assuming your customer form is called CustomerF and the customer's ID is CustomerID then you would set your query criteria to:

=Forms!CustomerF!CustomerID

Now any forms, queries, or reports that you build that use this query as a recordsource will show only related records for the current customer. Here is a sample database that I built that illustrates. I have a simple customer table, order table, and customer form.


click image to enlarge

You can build a query that says "only show me the order records for the currently open customer" like this:


click image to enlarge

Now, as long as your customer form is open and you run this query - or any other reports or forms that are based on it - you will see only the orders for the currently open customer. You can do the same thing with a form, basic listbox, and a button to open another query:


click image to enlarge

This is slightly more complicated, but uses the exact same principle.

Here is a FREE VIDEO TUTORIAL that will walk you through setting this up on your own, as well as a FREE SAMPLE DATABASE file that you can look at to get you started.

 Click here to view the FREE video
   

 Click here for Sample Database File  ZIP file, 16k, Access 2002 Format

I teach the concepts in this free mini tutorial in my Access 201 and 202 courses. These are full courses - over 60 minutes in length each. I spend a lot more time going over how to do this, in addition to lots more tips and tricks. For more information on these courses, click on the links to each class.

 

Huge Discounts Available
When you purchase multiple classes together
Huge savings up to 50% off! Order Now.
 

You may want to read these articles from the 599CD Blog:

 

 

Need
Help?

   
Do you have questions about Word, Excel, Access, Web Design, or computers in general? Just ask us anything you'd like.
 

Get Free Tips & Tricks
 

Join our mailing list today and get information on our Free Tips & Tricks Newsletter including free video tutorials, eBooks, live seminars, and more.

Email:
Name:
Type in the word to the left:
 
Your email will be kept 100% safe and will never be given to 3rd parties.
 


CLICK HERE for a FREE lesson



Order your first 599CD course now.
Your Satisfaction is Guaranteed!


Subscribe to our RSS FeedWhat's This?

Subscribe to RSS Feed  Add to Live Bookmarks  Add to My AOL  Add to MyYahoo  Add to Google Reader or Homepage    hide  help  

599CD Home   |   Learn More   |   What's New?   |   Contact Us   |   Free Demo   |   FAQs   |   Order Now   |   Become an Affiliate   |   TechHelp   |   MYOLP   |   Jobs   |   Chat   |   Downloads   |   Handbooks  (Text)   |    Mailing List   |   Lost Passwords   |   Referral Program   |   Online Poll   |   Troubleshooter   |   Corporate / Educational / Government / Non-Profit Sales   |   Message Forums   |   Testimonials   |   Privacy Policy   |   Tips & Tricks