Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Where Clause for current form

Posted on 2014-01-29
2
Medium Priority
?
327 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
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

Technology Partners: 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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

971 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