Solved

Where Clause for current form

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


WHERE [Office] = Forms!MainForm!cmOffice
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now