Alicia, comments in line ...
Jim, thanks so much for your advice. I have played with your concept with
some success and now have a couple of issues/question:
1. The combo box does become enabled as long as the control that the focus
moves to is enabled and visable. Is this correct (I created a control that
doesn't do anything and was planning on hiding it...but can figure out a way
to hide is with some other plan).
That's correct, and logical if you think about it. You could have an
exit form button to set focus to.
2. When I re-access the form with these controls/data, the previous
disabled combo box is again re-enabled where the data can be changed. I want
it to stay disabled. I tried to use some code and expressions but don't
know what I am doing.
While I don't know the purpose of the form, generally what you would
need to do to deal with the issue is to use some sort of flag on the
record.
For example you might have a Yes/No field called ItemEntered. You
would set that to true when the combo item is selected. And then when
the record is accessed again use the forms On Current event to set the
combos enabled property appropriately.
Me.cboBox.Enabled = Not Me.ItemEntered
This expression would set the enabled property to False when
ItemEntered is True.
3. Lastly, this is done on the After Update property where I already had a
macro attached to it. How/where do I add this macro to allow it to continue
to run after this disable process?
Run the macro in code. Use...
DoCmd.RunMacro "My Macro"
Followed by the code to deal with the combo box.
Thanks again for all of your help! I feel so proud that I got the combo box
to disable. Never used a module before. Scary
Alicia
Your'e welcome, and good for you. It becomes less scary over time. Why
in 3 or 4 years you won't give it a second thought ;-)
- Jim