Data Control recordsource problem 
Author Message
 Data Control recordsource problem

I am using VB4/16 against MS Sql Server 4.21a.  I have a data control whose
recordsource property is not set until the user enters part of a name in a text
box.  The lose focus event of the text box then sets the data1.recordsource =
"Select * from mytable where thename like '*" & txtbox & "*'"

My problem is that sometimes it doesn't work.  For example, if I type White
into the text box and hit tab, the lose focus code runs and returns  an empty
recordset.  When I type White into the text box again and hit tab, the lose
focus code runs and returns a two record recordset, which is correct.  However,
other strings usually work.  Also, if a search has succeeded, White will return
the two record recordset the first time.

Any ideas?


Sun, 30 Aug 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Data Control RecordSource Problem in VB 4.0

2. VB5 Data Control - Recordsource criteria from other control

3. No Tables Listed in RecordSource of Data Control

4. Ado Data control - recordsource

5. VB5 Data Control RecordSource

6. Data Control: Recordsource-Property restricted to 255 Characters ??

7. Need help changing Data Control Recordsource during runtime

8. Question : Clearing Data Control's Recordsource.

9. Setting a recordset object to a data control's recordsource property

10. Assigning a QueryDef to a data control recordsource.

11. Data Control RecordSource with QueryDef Parameters

12. Data Control Array ----- Maintaining individual recordsources


Powered by phpBB® Forum Software