Need Paramater Translation Help

B

brian

Can someone tell me why this doesn't work when passing this paramater to a form!

Like "*" Or Is Null

If I open up the form-recordsource and place the same line in the criteria box it works fine. Is there different formatting you need if you put Like [Forms]![SearchForm]![txtCustomer] in the criteria box? I would think that would translate to Like "*" Or Is Null

Any input?

Thanks
 
D

Dirk Goldgar

brian said:
Can someone tell me why this doesn't work when passing this paramater
to a form!

Like "*" Or Is Null

If I open up the form-recordsource and place the same line in the
criteria box it works fine. Is there different formatting you need
if you put Like [Forms]![SearchForm]![txtCustomer] in the criteria
box? I would think that would translate to Like "*" Or Is Null

Any input?

Please show the code wherein you are passing this parameter. If you are
talking about opening the form using DoCmd.OpenForm and specifying this
as part of the where-condition argument, it needs to look something like
this:

DoCmd.OpenForm "FormName", _
WhereCondition:="Customer Like ""*"" Or Customer Is Null"
 
J

John Spencer (MVP)

When you open the form's record source, it is a query.

The query grid has an expression service which will evaluate what you enter and
attempt to force it into useable SQL. When you pass a parameter to a form, the
expression service is not be available or cannot interpret what you are
attempting to pass.

Can you post the code you are using?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top