Hidden Combo Boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I posted this in the General Questions and received good, helpful answers,
but I'm still having a problem. I want to make 2 combo boxes, Groups and
Names, hidden until I choose the option/value Rules in another Combo box,
ChangeMade. I used this code in the AfterUpdate event of ChangeMade. (the
requery is to control the options available in another combo box.)

Private Sub ChangeMade_AfterUpdate()
Me.ChangeType = Null
Me.ChangeType.Requery
Me.ChangeType = Me.ChangeType.ItemData(0)

If Me.ChangeMade.Value = "Rules" Then
Me.Groups.Visible = True
Me.Names.Visible = True
Else
Me.Groups.Visible = False
Me.Names.Visible = False
End If
End Sub

I also tried in conjuction with this code and alone, the code below in the
OnOpen event of the form.

me.groups.visible = false
me.names.visible = false

But it seems that after Groups and Names are hidden, they don't reappear. I
have to manually reset the Visible property to Yes. Any ideas, workarounds,
troubleshooting....

Thanks!
 
Hi,
How many columns does ChangeMade have? If it's more than one, be aware that you are checking
for the value in the first column with your code, which may not be what you want.
If that's the case, use ChangeMade.Column(.........)
See Help for usage of the Column property.
 
I do have 2 columns in the table for ChangeMade. Would I put the name of the
column in the () then continue with the rest of the code? I looked in some
of the Help articles and didn't find anything on this sort of coding issue.
If you know the title to a specific Help article that would be helpful.

Thanks!
 
Hi,
Help will have the syntax for the column property. Columns are zero based so the first column is 0, the 2nd column 1 and so on.
I assume you need to check the value in the 2nd column:
Me.ChangeMade.Column(1)
 
Back
Top