Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Query on load cmd

Posted on 2009-04-13
9
Medium Priority
?
208 Views
Last Modified: 2013-11-28
Can I have the filter by form button run as soon as query opens?
0
Comment
Question by:-Gil
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 1440 total points
ID: 24131095
Try this in the load or open event:

docmd.RunCommand acCmdFilterByForm
0
 

Author Comment

by:-Gil
ID: 24131111
Where do I put this in a query I dont see a load or open event.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24131570
One of the reasons why queries are used, is for filtering.

So you could also add whatever you are trying to filter for as the Criteria.

(Or am I missing something)?

JeffCoachman
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:-Gil
ID: 24131928
I would like the query to open and appear like the screen shot below.
 It will not be used in a form or report.

On load I would like it to open with the FILTER BY FORM button pressed.

Like mbizup posted above with the docmd.RunCommand acCmdFilterByForm.
I see how that works for a form or report but I would like the query to start like that.

-gil


QuerypicEE.bmp
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 60 total points
ID: 24132285
(No Points wanted)


Open the query from a button on a form.

The code on the button will be something like this:

  DoCmd.OpenQuery "YourQuery"
  DoCmd.RunCommand acCmdFilterByForm

Again, no points wanted.

;-)

Jeff
0
 

Author Comment

by:-Gil
ID: 24132406
Curious.
Why wouldn't you want the points?
-gil

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24132907
Gil,

"Why wouldn't you want the points?"

1. Because the solution is mbizup's, not mine.
2. I don't really care about the points.
4. You have given me enough points!  ;-)  LOL!
3. I did this just to help out

So give the full points to mbizup

;-)

Jeff
0
 
LVL 61

Expert Comment

by:mbizup
ID: 24133238
Jeff,

Thanks.

-Gil
Sorry for being absent on this one.  I've been swamped today.  When I posted, I had misread "as soon as query opens" as  "as soon as Form opens".  

I'd be happy with any point allocation you decide on.  I have a lot of points and still can't trade them in for a steak dinner.  :)
0
 

Author Comment

by:-Gil
ID: 24137191
4. You have given me enough points!  ;-)  LOL!

So so true lol

Still gave you 20 to highlight the post
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

636 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