|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Query problem
Can anyone see what the problem is here: -
Set myRecSet = MyConn.Execute("SELECT client.* from client where first_name LIKE '*Tim*'") For arNum = 0 To ThisForm.txtTextBox.UBound ThisForm.txtTextBox(arNum) = myRecSet(arNum) & "" ' errors here Next arNum I know the query works as I have tried it directly in access but in vb I am getting the error "either BOF or EOF is true...." I know the query only brings back one record but that shouldn't make any difference should it? |
|
#2
|
||||
|
||||
|
you have to move through the recordset
i.e. myRecSet.MoveNext You should also have to access each field in the recordset i.e. myRecSet!fieldname or myRecSet.Fields("fieldname").Value |
|
#3
|
|||
|
|||
|
Its ok I've sussed it, the problem was that ADO uses % instead of * for LIKE sql statements for some reason.
As for the arNum, I have the same number of textboxes as I do fields in the query so for each field a textbox gets populated, its possible to reference fields by their number order as well as their fieldname. Cheers though mate, appreciated ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Query problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|