• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 100
  • Last Modified:

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

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
shogun5
Asked:
shogun5
  • 3
  • 2
1 Solution
 
PatHartmanCommented:
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
 
shogun5Author Commented:
Pat,

Worked like a charm! Thanks!
0
 
PatHartmanCommented:
Great.  Which method did you use?
0
 
shogun5Author Commented:
I just changed the sign in SQL it was easy enough.
0
 
PatHartmanCommented:
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

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now