Solved

Where Clause for current form

Posted on 2014-01-29
2
325 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 500 total points
ID: 39818138
Try this for your WHERE clause:


WHERE [Office] = Forms!MainForm!cmOffice
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

623 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