Event Handling

  • Thread starter Thread starter Andrew Tatum
  • Start date Start date
A

Andrew Tatum

Hey guys -

I have this code so far. I need CompanyID to "reset" whenever I click
for the next record. Right now, it stays stagnet while other fields
change. Any idea what's going on?

Private Sub CompanyID_AfterUpdate()
Me.InvoiceID = Null
Me.InvoiceID.Requery
Me.InvoiceID = Me.InvoiceID.ItemData(0)
End Sub

Private Sub Form_Current()
Me.InvoiceID.Requery
End Sub

Private Sub Form_Load()
Me.CompanyID = Me.CompanyID.ItemData(0)
Call CompanyID_AfterUpdate
End Sub
 
What's your definition of "reset"? You're currently setting it up so that
the first row is going to be selected automatically. Are you saying when you
change records, you don't want the first row of the combo box to be
selected? If so, try putting Me.CompanyID = Null in the Form_Current event.

If it means something else to you, please provide details.
 
Back
Top