UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Passing a value from form as a parameter to a query??    
 
   
GotAccess
post Aug 9 2005, 06:20 AM
Post #1

New Member
Posts: 10



Hi all,
Can anybody explain how to pass a value which is in a drop down menu as a parameter to a query which will be the record source for a report...

Riaz
Go to the top of the page
 
+
argeedblu
post Aug 9 2005, 07:01 AM
Post #2

UA Forum + Wiki Administrator
Posts: 11,943
From: Sudbury, Ontario, Canada



Riaz,

On the criteria row of the query enter the expression Forms!Formname!controlname , substituting your form name and cotrol name. The form must be open when the query runs.

Glenn
Go to the top of the page
 
+
fkegley
post Aug 9 2005, 08:08 AM
Post #3

UtterAccess VIP
Posts: 23,583
From: Mississippi



Adding to Glenn's post, I usually put a command button on the form that opens the query and/or report.
Go to the top of the page
 
+
GotAccess
post Aug 9 2005, 02:11 PM
Post #4

New Member
Posts: 10



Ya, I have tried that... Attaching a sample dbase...
but here is what I am looking for...
The report displays all the case count for 12 months...and it is for different years...
I need a form that will accept year as input and will open the same report displaying records for only that year...
I hope I am clear.
Attached File(s)
Attached File  766337-TestAccess.zip ( 17.79K ) Number of downloads: 1
 
Go to the top of the page
 
+
fkegley
post Aug 10 2005, 12:14 AM
Post #5

UtterAccess VIP
Posts: 23,583
From: Mississippi



I do not have the report working. However, I did manage to get the crosstab query to work using a date entered from the form. Crosstab queries are different animals from the normal run of the mill select queries.

I have attached my work. Form1 is the form that matters. I also changed the Crosstab query by putting an entry in the Parameters dialog box.
Attached File(s)
Attached File  770071-766337-TestAccess.zip ( 29.07K ) Number of downloads: 8
 
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 10:06 AM