Requery

  • Thread starter Thread starter golan
  • Start date Start date
G

golan

hello,i have 2 comobox in form.
comobox"2" get the data form a query which dependent form comobox"1".
i have event after update Me.frmasset.Requery in combobox"1".
the data from the comobox's go to fileds in a table.
the query ok but when i have some rews in the table when i click in comobox"2"
the data doesn't refresh.
this the code cobobox"1"

Private Sub frmrenter_AfterUpdate()

Dim payment As DAO.Recordset
Set payment = CurrentDb.OpenRecordset("tblpayment", dbOpenDynaset)
payment.Edit
payment.Fields!renter_id.Value = Null
payment.Update
payment.Close
Me.combobox"1".Requery
Me.Form.Refresh

end sub
 
Check the name of the combobox. I suspect it is ComboBox1 (no quote
marks)

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
golan said:
hello,i have 2 comobox in form.
comobox"2" get the data form a query which dependent form comobox"1".
i have event after update Me.frmasset.Requery in combobox"1".
the data from the comobox's go to fileds in a table.
the query ok but when i have some rews in the table when i click in
comobox"2"
the data doesn't refresh.
this the code cobobox"1"

Private Sub frmrenter_AfterUpdate()

Dim payment As DAO.Recordset
Set payment = CurrentDb.OpenRecordset("tblpayment", dbOpenDynaset)
payment.Edit
payment.Fields!renter_id.Value = Null
payment.Update
payment.Close
Me.combobox"1".Requery
Me.Form.Refresh

end sub
 
Back
Top