Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Where Clause for current form

Posted on 2014-01-29
2
Medium Priority
?
326 Views
Last Modified: 2014-01-29
I need a where clause for a query that will pull up results based on a current open form value.

The open form is name "MainForm". Depending on the "Office" value of that form, I want to query to give the results. The combo box on that field is titled cmOffice. The value is saved to a column on the table titled "Office".

Thanks!
0
Comment
Question by:cansevin
[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
2 Comments
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 39818136
Have you done VBA code?  You know how to get to that window, right (Alt + F12)?
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39818138
Try this for your WHERE clause:


WHERE [Office] = Forms!MainForm!cmOffice
0

Featured Post

Independent Software Vendors: 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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

705 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