A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Question



 
 
Thread Tools Display Modes
  #1  
Old March 2nd, 2010, 04:49 PM posted to microsoft.public.access.queries
Ryan
external usenet poster
 
Posts: 551
Default Query Question

Hello, I have a query that i would like to filter when i click a button on my
form, that uses a field on the form to filter the query. I do not to display
info in a report or form, or table but to export to excel. i cannot figure
out how to do this....any help would be appreciated.

Ryan
  #2  
Old March 2nd, 2010, 07:39 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Query Question

Create a form named something like frmParameter. On the form have a text box
named something like txtParameter.

On this same form put a command button and on the On Click event of the
button put:

DoCmd.OpenQuery "qryParameter"
Me.Visible = False

Create a query named something like qryParameter with the line below in the
criteria of the correct field.

[Forms]![frmParameter]![txtParameter]

The form Parameter must stay open for the query to run; however, it can be
minimized or even invisible.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"Ryan" wrote:

Hello, I have a query that i would like to filter when i click a button on my
form, that uses a field on the form to filter the query. I do not to display
info in a report or form, or table but to export to excel. i cannot figure
out how to do this....any help would be appreciated.

Ryan

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.