How do I select records based on a value typed into a text box 
Author Message
 How do I select records based on a value typed into a text box


I ran your program.  It worked for me.  As soon as the form started,  I used
the data control to cycle through the entire database.  If I entered a ssn,
then it retrieved that one record.  At this point I could only cycle through
the records that had the same ssn.

Quote:

>I have tried to select records based on a value typed into a text box.  
>When I use an SQL without a WHERE condition the program works, but when I
>add the where clause and use a recordset I don't see any records at all.
>Can somebody please help me on this.



Wed, 17 Jun 1998 03:00:00 GMT  
 How do I select records based on a value typed into a text box

Quote:

> I have tried to select records based on a value typed into a text box.
> When I use an SQL without a WHERE condition the program works, but when I
> add the where clause and use a recordset I don't see any records at all.
> Can somebody please help me on this.

> SQL = "Select DISTINCTROW [Student Id], [Student Name], [State]"
> SQL = SQL & "FROM [Student] WHERE [Student Id] = " & Text1.Text

Text to be matched needs to be in single quotes :

         ... Where [student id] = '" & text1.text & "'"



Sat, 20 Jun 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Cetting A Report To Select Records Based Upon A Value Selected In A Combo Box

2. sql based on text box value

3. Spliting a record into many records based on its value

4. Select all text when selecting a text box?

5. '97 Set text box value to SQL Select statement

6. Protecting Type/Value Mismatch in Text Entry Boxes

7. enter data in a combo box based on value from another combo box

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

9. List box search based on text box entry...

10. How to set default value of combo box to value of record in database

11. Replacing The Text String Value In A Record With That From A Previous Record

12. selecting records for 2nd combo box dependant on first combo box

 

 
Powered by phpBB® Forum Software