Accessing sub-fields

  • Thread starter Thread starter Sok Hong
  • Start date Start date
S

Sok Hong

Hello, I've set one of the fields so that if the user
selects a certain selection, a sub menu will appear, and
if a user selects a different selection, a different sub
menu appears. Both sub menus are set invisible as
default. However, if the user goes to a new record to
enter in the new data, if the sub menu was made visible in
the previous entry, it will visible to the user when
entering in new data.

Secondly, if the user selects 1, sub menu 1 comes up, but
if he changes his choice to 2, sub menu 2 comes up,
however sub menu 1 is still accessible. Is there anyway
to correct that?

Here is the code I am currently using:

If [Text173].Value = "10" Then
[Combo199].Visible = True
ElseIf [Text173].Value = "4" Then
[Combo219].Visible = True
Else
[Combo219].Visible = False
[Combo199].Visible = False
End If

Thank you.
 
Hi,
Try this:
If [Text173].Value = "10" Then
[Combo199].Visible = True
[Combo219].Visible = False
ElseIf [Text173].Value = "4" Then
[Combo219].Visible = True
[Combo199].Visible = False
Else
[Combo219].Visible = False
[Combo199].Visible = False
End If

You can also place code in the Current
event if you want the combos to be initially invisible when the user navigates
to another record
 
Thank you, your help worked beautifully. However, in
the "Events" tab under properties, I don not see
a "Current Event" selection. Any ideas?

-----Original Message-----
Hi,
Try this:
If [Text173].Value = "10" Then
[Combo199].Visible = True
[Combo219].Visible = False
ElseIf [Text173].Value = "4" Then
[Combo219].Visible = True
[Combo199].Visible = False
Else
[Combo219].Visible = False
[Combo199].Visible = False
End If

You can also place code in the Current
event if you want the combos to be initially invisible when the user navigates
to another record
--
HTH
Dan Artuso, Access MVP


"Sok Hong" <[email protected]> wrote in
message news:[email protected]...
Hello, I've set one of the fields so that if the user
selects a certain selection, a sub menu will appear, and
if a user selects a different selection, a different sub
menu appears. Both sub menus are set invisible as
default. However, if the user goes to a new record to
enter in the new data, if the sub menu was made visible in
the previous entry, it will visible to the user when
entering in new data.

Secondly, if the user selects 1, sub menu 1 comes up, but
if he changes his choice to 2, sub menu 2 comes up,
however sub menu 1 is still accessible. Is there anyway
to correct that?

Here is the code I am currently using:

If [Text173].Value = "10" Then
[Combo199].Visible = True
ElseIf [Text173].Value = "4" Then
[Combo219].Visible = True
Else
[Combo219].Visible = False
[Combo199].Visible = False
End If

Thank you.


.
 
Back
Top