Textbox query lookup

m3ckon

New member
Local time
Today, 17:19
Joined
Oct 26, 2005
Messages
6
Hi there,

I usually code in .net or asp, but am building a system in pure access.

I want to do the following from a textbox on a form....

1) Lookup all values in a table that match textbox.value *
2) lookup all values that matach * textbox.value *

I want to display the values that match textbox.value * first

So far I worte a query that has a parameter of Like ([Forms]![formname]![txtname]+"*")
Yet I'm unsure as to how to get the query to display the ressults in the format I want... can someone help please?

M3ckon
 
thanks I've tried that, but it does not enable me to order by the results from the 'like value *' before the ressults of 'like * value *'

As a way round I've written this query:

SELECT [Cases Textbox Query].*
FROM [Cases Textbox Query] order by [Cases].[Case Name] asc
UNION ALL Select [Cases Texbox Query 2].*
FROM
[Cases Texbox Query 2] where [Cases].[Case Name]
NOT in
(
SELECT [Cases].[Case Name]
FROM [Cases Textbox Query]
);


However, the order by clause does not work....can anyone give me some insight as to why this is please?
 

Users who are viewing this thread

Back
Top Bottom