My query works fine. I check it in debugger it gives me the correct
value. But the textbox which i create in the form is not bound with the
table. I dont know it needs to bound or not as i need only a textbox
for display. In this text box it shows the last value of the recordset
and repeat it in the subform. I dont know how to i fix this problem.
qry = "SELECT tbl_EquipmentCh ronology.Equipm ent1 FROM
tbl_EquipmentCh ronology INNER JOIN tbl_events ON
tbl_events.Tick etNum=tbl_Equip mentChronology. TicketNum where
tbl_events.Tick etNum=" &
Forms!tbl_PPVRe search_Edit!frm _Events!TicketN um & " and
tbl_events.PPVV OD_Outlet=tbl_E quipmentChronol ogy.Outlet"
Set rst = CurrentDb.OpenR ecordset(qry)
rst.MoveFirst
Do While Not rst.EOF
Forms!tbl_PPVRe search_Edit!frm _Events!text2 = rst!Equipment1
rst.MoveNext
Loop
value. But the textbox which i create in the form is not bound with the
table. I dont know it needs to bound or not as i need only a textbox
for display. In this text box it shows the last value of the recordset
and repeat it in the subform. I dont know how to i fix this problem.
qry = "SELECT tbl_EquipmentCh ronology.Equipm ent1 FROM
tbl_EquipmentCh ronology INNER JOIN tbl_events ON
tbl_events.Tick etNum=tbl_Equip mentChronology. TicketNum where
tbl_events.Tick etNum=" &
Forms!tbl_PPVRe search_Edit!frm _Events!TicketN um & " and
tbl_events.PPVV OD_Outlet=tbl_E quipmentChronol ogy.Outlet"
Set rst = CurrentDb.OpenR ecordset(qry)
rst.MoveFirst
Do While Not rst.EOF
Forms!tbl_PPVRe search_Edit!frm _Events!text2 = rst!Equipment1
rst.MoveNext
Loop
Comment