Minggu, 23 Agustus 2015

Re: [MS_AccessPros] Parameter QUERY stops working

 

Jorge-

I think Duane understood you perfectly.  He is telling you that you shouldn't use a parameter this way for queries you use frequently.  You should use an open form to provide the parameter values.  He gave you a link to a web page that explains how to do that.

Note also that if you use a parameter query like yours as the Record Source of a report, you may get prompted for the parameter multiple times as you scroll through the report.  This happens because most reports open and close the source query multiple times.

Finally, coding a filter using LIKE and wild cards is very inefficient because you force the query engine to look at every record in your table rather than do a quick lookup in an index.

John Viescas 

Sent from my iPad

On Aug 23, 2015, at 16:17, muralles_r12@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hi Duane.

I am not sure if I explain this well.

I have a query I use to see all the records for a customer.

**********************************************

Like "*" & [ Enter Owner's Last Name ] & "*"

**********************************************

I enter the code above on the last name field.

When I run this query a form pops up and I enter the last name of the customer.

This works fine but after a while, it stops, I enter the criteria to search for, click OK and the criteria disappears but the query does not return any results.

I have to enter the search criteria again and then it does work.

This gets fixed if I go to the query in design view, cut the code above, save the query, open it up in design view and paste the code again.

Thanks for the help.

Jorge Muralles

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

.

__,_._,___

Tidak ada komentar:

Posting Komentar