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
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