expression

kingsgambit

Registered User.
Local time
Today, 16:44
Joined
May 27, 2001
Messages
134
I am building a address book where the user can click on button "a" and all companies beginning with "a" will be displayed in a list box.
I want to do this by coding each button with the row source of the listbox.
In my query I used
LeftChar: Left([Company],1) this works fine,

but if I use the SQL code

SELECT [Table1].[First Name], [Table1].[Surname Name], [Table1].[Company], Left([Company],1) AS lf
FROM Table1
WHERE ((([Table1].[Surname Name])>"") And ((Left([Company],1)) Like "b" Or (Left([Company],1))="a"))
ORDER BY [Table1].[Surname Name];

it does not, it does not run the expression in the query.
Can anybody help
 
Take a look at the 'Customer Phone List' form in the Northwinds database for one way to do what you want.

hth,
Jack
 
I had a look at that database, but it just shows all your addresses. It does not have a search form.
I want to be able to search by the first letter of each company.
As I posted this before, the query will work fine, but the SQl statement does not run the expression.

Any ideas
 

Users who are viewing this thread

Back
Top Bottom