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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Query Problem

Status
Not open for further replies.

istevens

Technical User
Feb 11, 2003
4
AU
Hi,
I have created a crosstab query(not in the code) and want to pass a parameter(from a form) to it.

E.g - [BusinessProcessDetails_Crosstab].[BusinessArea] = [forms]![formLookup]![txtBusArea]

However I'm getting an error "The Microsoft Jet Database does not recognise [forms]![formLookup]![txtBusArea] as a valid field name or expression"

If I do the following [BusinessProcessDetails_Crosstab].[BusinessArea] = "Bar Mill" it works fine.

I tried to pass the parameter as a string '" & [forms]![formLookup]![txtBusArea] & "'" but it returns nothing.

Can anybody help me with this one. I don't want to do in the code however.

Thanks

 
Hi,

When you say:

[BusinessProcessDetails_Crosstab].[BusinessArea] = [forms]![formLookup]![txtBusArea]

I assume you are meaning that in the query builder, in the criteria field below the BusinessArea field you have:

[forms]![formLookup]![txtBusArea]

If so, as it IS a lookup, are you closing the lookup immediately after calling the query (and from within the lookup form itself)?

Otherwise, can you explain which form starts this, and how, where the query displays it's results etc.

Regards,

Darrylle
"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top