Assistance doing select statement 
Author Message
 Assistance doing select statement

Greetings!

I have a situation where I'm trying to do the following--

1. I key in a user's Last, First MiddleInitial.  (on a Data Entry form in an
Unbound form field.)  I want this to go look up these fields in my SQL
database and return anything like the statement I keyed.  Here is the
catch-- the fields (First, Last and MiddleInitial) are all stored in the
database as separate fields.

2.  If it finds ONE match and one only, it should pull up a "Data Entry"
form.  If it finds TWO or MORE it pulls up a form that allows me to
double-click a name and then takes me to the "Data Entry" form.  Obviously,
if it finds NO matches it alerts me to that fact.  How would I go about
creating this code?

I'm using ADO to create this..........

===============================

For example, I key in do, ja a and it returns:

Doe, Jane A
Doughty, Jake A
Donner, Jackie A

====================================

Any help is greatly appreciated!!!

Thank you!

KJ



Wed, 23 Jul 2003 13:32:53 GMT  
 Assistance doing select statement
Hello,

I'm not sure if this is what you're looking for but try using the AND
keyword.
EX.  Where LastName Like 'LastName' AND FirstName Like 'FirstName' AND MI
Like 'MI'
Hope this helps.

--
Chris Smith
CJS Solutions
http://www.cjssolutions.com
Home of DB Companion,  Microsoft Access Maintenance Utility


Quote:
> Greetings!

> I have a situation where I'm trying to do the following--

> 1. I key in a user's Last, First MiddleInitial.  (on a Data Entry form in
an
> Unbound form field.)  I want this to go look up these fields in my SQL
> database and return anything like the statement I keyed.  Here is the
> catch-- the fields (First, Last and MiddleInitial) are all stored in the
> database as separate fields.

> 2.  If it finds ONE match and one only, it should pull up a "Data Entry"
> form.  If it finds TWO or MORE it pulls up a form that allows me to
> double-click a name and then takes me to the "Data Entry" form.
Obviously,
> if it finds NO matches it alerts me to that fact.  How would I go about
> creating this code?

> I'm using ADO to create this..........

> ===============================

> For example, I key in do, ja a and it returns:

> Doe, Jane A
> Doughty, Jake A
> Donner, Jackie A

> ====================================

> Any help is greatly appreciated!!!

> Thank you!

> KJ



Fri, 25 Jul 2003 04:41:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Assistance with SQL INSERT statement in VB6.0

2. Need assistance with SQL Statement

3. How to select the current record only with SELECT statement

4. SQL statement not doing its job

5. Select Case - What am I doing wrong?

6. Menus: How do I allow my program to continue doing stuff while a menu is selected

7. Error 3849 when doing SELECT on floating-point field (type adDouble)

8. Problem with SELECT statement

9. Access: Err 2342 in SQL SELECT Statement in VBA

10. Help Please with Select Statement using AND

11. Counting records returned by SQL Select statement

12. WHERE CLAUSE IN SELECT STATEMENT

 

 
Powered by phpBB® Forum Software