michele griffone
michele griffone

Reputation: 1

Access VBA cascading comboboxes return blank value when adding new data in subform

Firstly I apologise for my poor English, and thanks to you all in advance for the help I will receive.

In a subform I have created some cascading comboboxes. The master is called 'Species' and the slave is called 'Quality'. They are both included in a continuous subform with some other data fields.

While in the process to populate the 2nd, 3rd, etc records in the subform, the 'Quality' field (cbox slave) becomes blank. I tried to remove the 'requery' instruction (unsuccessfully) from the VBA code.

Do you have any idea why it happens and how I can fix it? Your support is much, much appreciated. Please feel free to ask me for further details if you are interested in my issue.

Thanks!

Upvotes: 0

Views: 86

Answers (1)

Sergey S.
Sergey S.

Reputation: 6336

Why it happens and what to do explained, for instance here

You can also show in second box all items, but sort the list: valid items on top, invalid at bottom and in BeforeUpdate field event check if selected item is valid. If invalid, deny update (Cancel=True) and show message to user.

Upvotes: 1

Related Questions