N
Nat Vascular
Thanks, in advance, so much for your time and help!
I have two bound combo boxes on a for. They are referring_group and
referring_physician. After a selection of referring_group, a query runs that
returns a list of referring_physicians that belong to the referring_group
selected. Both combo boxes are set to must-enter and no zero-length string
and both are limited to the list in the combo box. What I am trying to get
to happen is when the referring_group is changed, the referring_physician is
reset to Null, and requeried based on the new selection in the referral_group
control. My approach is to place an event procedure at the AfterUpdate event
of the referring_group combo box:
me.referring_physician.requery 'this requeries the control and works fine
DoCmd.GoToControl "referring_physician 'this moves focus and work fine
me.referring_physician = Null 'to reset control and force re-selection
based on new list.
This one errors telling me that because the field is must enter it cannot be
set to Null. This doesn't make total sense to me. The control doesn't write
the record to the database until after the entire form is complete....why
would it check that now? Is there another way to reset this control so the
old selection is removed?
I looked for a command like:
me.referring_physician.reset
I tried:
me.referring_physician.undo - that didn't work I suspect because it was
issued from the other control and there was really nothing to undo. I would
think this is a pretty common thing to try and do and someone has had to
figured out an easy way to accomplish.
Thanks so much for your help!
Mike
I have two bound combo boxes on a for. They are referring_group and
referring_physician. After a selection of referring_group, a query runs that
returns a list of referring_physicians that belong to the referring_group
selected. Both combo boxes are set to must-enter and no zero-length string
and both are limited to the list in the combo box. What I am trying to get
to happen is when the referring_group is changed, the referring_physician is
reset to Null, and requeried based on the new selection in the referral_group
control. My approach is to place an event procedure at the AfterUpdate event
of the referring_group combo box:
me.referring_physician.requery 'this requeries the control and works fine
DoCmd.GoToControl "referring_physician 'this moves focus and work fine
me.referring_physician = Null 'to reset control and force re-selection
based on new list.
This one errors telling me that because the field is must enter it cannot be
set to Null. This doesn't make total sense to me. The control doesn't write
the record to the database until after the entire form is complete....why
would it check that now? Is there another way to reset this control so the
old selection is removed?
I looked for a command like:
me.referring_physician.reset
I tried:
me.referring_physician.undo - that didn't work I suspect because it was
issued from the other control and there was really nothing to undo. I would
think this is a pretty common thing to try and do and someone has had to
figured out an easy way to accomplish.
Thanks so much for your help!
Mike