Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I reference another table's field value in MS Access query?

Posted on 2016-08-24
5
Medium Priority
?
87 Views
Last Modified: 2016-08-25
Dear Experts!

Please see attached file. What is the proper syntax for referencing a field from a different table in my query? The query works great when I type a date in manually but when I reference a field it does not.

Thanks!
screenshots.pdf
0
Comment
Question by:shogun5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
PatHartman earned 2000 total points
ID: 41768716
You can only reference tables that are included in the query.  You can drag this table onto the QBE and draw a join line between the two dates.  Remove the criteria because the join will serve that purpose.  Then put the query into SQL view and change this join's relational operator from "=" to ">=".  Once you change to a non-equi join, you won't be able to return to QBE view since the editor can only display equi-joins graphically.

Another way to enter criteria is to use a form to run the query/report/form.  The query would reference the form.

Where SomeField = Forms!someform!somefield
0
 

Author Closing Comment

by:shogun5
ID: 41769480
Pat,

Worked like a charm! Thanks!
0
 
LVL 39

Expert Comment

by:PatHartman
ID: 41769482
Great.  Which method did you use?
0
 

Author Comment

by:shogun5
ID: 41770139
I just changed the sign in SQL it was easy enough.
0
 
LVL 39

Expert Comment

by:PatHartman
ID: 41770599
Thanks.  It is always good to clarify which solution worked for you when more than one is offered.  That helps people who find the thread later.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question