Field dependent on another won't keep the data

J

Jacques

Hello all,
I have two fields, where the second field shows a list based on what was
chosen in the first field. Both fields are pulldowns based on SQL
statements. The problem is, even though it works fine, when you go to the
second record and choose something in the first field, it clears the second
field of every other record.

Example

Field 1 Field 2
Data Data works fine, but

Data empties
Data Data this happens after going to the
next record (or clicking on any other existing record).

I have an AfterUpdate event to make sure that its reset, but don't know why
the data doesn't stay when going to another record.


Private Sub BillCont_AfterUpdate()
Me.Accts = Null
Me.Accts.Requery
Me.Accts = Me.Accts.ItemData(0)
End Sub


Thanks beforehand,
 

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