Solved

Where Clause for current form

Posted on 2014-01-29
2
312 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

762 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

19 Experts available now in Live!

Get 1:1 Help Now