Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Parameters 3

Status
Not open for further replies.

bmacleod

Technical User
Jun 19, 2001
7
CA
Can u create a parameter witin a crosstab query that draws its criteria from a custom dialog box. I have used this in select queries with no problem but it does not work in a crosstab. (Access 97) Any help would be appreciated.
 
Yes, you can.

In the Total line of the column where you want the parameter set, change the selection from Group By to Where.

Should do it.
Larry De Laruelle
larry1de@yahoo.com

 
Thanks Larry but I have already done this and it still didn't work.
 
in query design, right-click up top, choose PARAMETERS.

under PARAMETER put in your criteria (copy it from below and paste it in) and set the data type to whatever it is.

hopefully that will work.

g
 
Hi GingerR,

Thanks for your help. It works for my text field but do u know what the proper line code should be for a date/time field using the between command. I used Between [Forms!Frm_ReportCentral!Txt_StartDate] And [Forms!Frm_ReportCentral!Txt_CloseDate] but I was prompted for a parameter. Taking out the brackets didn't work either. Any help would be once again greatly appreciated.


 
you really had the brackets like that? only one set around each parameter? i did that just to see what would happen and got a bracket error message. brackets should be around each object:

Between [Forms]![Frm_ReportCentral![Txt_StartDate] And [Forms]![Frm_ReportCentral]![Txt_CloseDate]

are you still talking about the crosstab query? if so then put these two things in the parameters box too.



 
Hi Again GingerR,

I know the bracketing looked odd the way i did it but I received the error message(invalid bracketing) when i tried the way you suggested.

Why I attempted it with only one bracket was because, on the first parameter I received the error message (invalid bracketing) so I changed it(see below) and it worked. [Forms]![Frm_ReportCentral]![Txt_VSM] didn't work but Forms!Frm_ReportCentral!Txt_VSM did.

Either way the 2nd date parameter is still not working. Any thoughts. Once again thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top