
Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
On Apr 8, 8:13 pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
> Forgot to add, in order for the enable/disable to be maintained as you move
> from record to record, the same code needs to be in the form's OnCurrent
[quoted text clipped - 30 lines]
>
> - Show quoted text -
Thank you for your prompt help! Unfortunately, nothing is fixed. I
changed the name of the text boxes, PageName and Text to Screentitle
and InstructionalText respectively. The code for the cbo box After
Update now looks like this:
Private Sub cboPageType_AfterUpdate()
If Me.cboPageType = "CompCheck_Page" Then
Me.ScreenTitle.Enabled = False
Me.InstructionalText.Enabled = False
Else
Me.ScreenTitle.Enabled = True
Me.InstructionalText.Enabled = True
End If
End Sub
I also made sure to make the name changes in the Table, as well. The
name of the combo box and the contents of the cbo box remain the
same. I also made sure to add that previous code into the form's
OnCurrent event. The [Event Procedure] is present in the cbo box's
After Update and the form's On Current properties.
To clear up what I described previously, what I have is a form with
all text controls enabled; this is the default setting for the whole
form. What I would like to have is certain text box controls disabled
when Choice B from the cbo box is chosen for that record. So maybe in
records 1 through 7, Choice A is chosen from the cbo box and are
normal and text boxes enabled, but record 8 has Choice B chosen in the
cbo box, so I would like certain text boxes disabled for that record
only and for any other records where Choice B is chosen from the cbo
box.
How would I know if the cbo box is corrupted? Other than it not
working?
As an addendum, I would like to have the same functionality with a
button; making it invisible until Choice B is chosen on the cbo box.
I tried making a button and coding it to be invisible until the cbo
box event, but that doesn't work, either. The button remains
invisible regardless; I'd have to make it visible by switching the
Visible property to "yes".
I don't know if this matters, but I'm using Access 2002.
Thanks again!
Carlos
Carlos1815 - 09 Apr 2008 21:30 GMT
> On Apr 8, 8:13 pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
> wrote:
[quoted text clipped - 81 lines]
>
> - Show quoted text -
I found the problem! There were two columns in the Table bound to the
cbo box, I had the code refer to the wrong column. I set it to
recognize the correct column in the Table, and the form functions like
I mentioned. Thanks for your insight!
Carlos