• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 133
  • Last Modified:

Searching using a datagrid..?

I would like to be able to search for records and have them displayed on a datagrid. It would be even better if I could just type part of the relevant field and get results that match. eg typing 'jo' and getting all the names that begin with Jo...
Ive tried using the following, with a few variations, to no avail. (I'm using MS Access 2000, and connecting with ADO)

"SELECT * from TableName WHERE FName like 'Jo*'",connect..

The connection and all are OK, My only problem is it seems to have a problem with the criteria...
0
doefoot01
Asked:
doefoot01
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
try
"SELECT * from TableName WHERE FName like 'Jo%'

access < 2000 used *, access 2000 uses % (as far as I remember)

Cheers
0
 
wensinkgCommented:
It's not so much that Access 2K uses the % for its wildcard as much as it is Jet 4.0 (ADO 2.5 ^) that uses it.  But Angellll is right.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now