bind method with a textbox

E

Eric

Can any one please help me out how to i bind this method with a
textbox. I create a texbox control in my subform and needs some values
from the result set. I debug my code it gives me correct values problem
is when i print these values it shows only the last value from the
record set in the subform. May be this method needs to bind with the
textbox and i dont know how to i bind it. Do i make a function and call
it in the control source or any thing else. My form is a continous form
and the value which i need is only for the display in the form.

Thanks,

Private Sub Form_Open(Cancel As Integer)
Dim qry As String, rst As Object
qry = "SELECT tbl_EquipmentChronology.Equipment1 FROM
tbl_EquipmentChronology INNER JOIN tbl_events ON

tbl_events.TicketNum=tbl_EquipmentChronology.TicketNum where
tbl_events.TicketNum=" &

Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum & " and
tbl_events.PPVVOD_Outlet=tbl_EquipmentChronology.Outlet"
Set rst = CurrentDb.OpenRecordset(qry)
rst.MoveFirst
Do While Not rst.EOF
Forms!tbl_PPVResearch_Edit!frm_Events!Text2 = rst!Equipment1
rst.MoveNext
Loop
End Sub
 
B

Brendan Reynolds

Eric, I've answered this question in one of the other newsgroups where you
posted it, and I believe Larry Linson has also replied to a similar thread
that you have going in one of the newsgroups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top