By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,226 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,226 IT Pros & Developers. It's quick & easy.

Filter report using form filter

P: 121

I am filtering a report using the form filter with the following code

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "report1", acViewReport, , Me.filter
Which works fine untill I filter the form on one of the fields which is a lookup field
and I get the enter parameter value box which is looking for the Assetdetails.details field which contains the following text for some reason it has put Lookup_ at the front of the field

I think that the because the lookup field actually stores the ID number rather than the text in the form

When I open the form in design view in the filter property it contains the following string

([Lookup_AssetDetails].[Details]="AKG C414 Microphone Condenser")
Is there anyway around this problem?

regards Phill
Nov 25 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,287
You could probably use:
Expand|Select|Wrap|Line Numbers
  1. Replace(Me.filter, "Lookup_", "")
Nov 25 '09 #2

Expert Mod 15k+
P: 31,419
Perhaps if you explained exactly what you're trying to do (Give some more detail as we cannot check out what you're talking about by looking at the database - We don't have it).

Is Details a lookup field? If so, what are the details? What's the name of the field you're really trying to filter on?

We need some details even to understand the question properly, but certainly to provide a decent answer.
Nov 29 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.