troubleshooting Question

How to show a control based upon the value of a field

Avatar of CroetOne
CroetOneFlag for Netherlands asked on
Microsoft Access
17 Comments1 Solution17 ViewsLast Modified:
In MS ACCESS I have a form with a combo box. Depending on the value that is chosen by the user, the form shows an other control (field). Moving between the records, the form does not shows the control that belongs to the chosen value in the combo box. The only way the control is showing, is on the "on click" event of the combo box.
I have tried several alternatives approaches, using a next-record-button and force the form to repaint. I have  tried the current form event with this code (works on the click event of the combo box):
If Me.TypeReport.Value = "Bijlage" Then
    Me.knpBrowseBijlage.Visible = True
    Me.FullPathName.Visible = True
    If Me.knpBrowseBijlage.Visible = True Then
        Me.FullPathName.Value = ""
    End If
    Me.knpBrowseBijlage.Visible = False
    Me.FullPathName.Visible = False
End If

Open in new window

Although the event occurs (I placed a msgbox in the code) the form does not shows "Me.knpBrowseBijlage" nor "Me.FullPathName".

Using the combo box:
When entering the record using the next of previous record button:
Using the next or previous record button the form should give me also the two other controls when the combo box contains "Bijlage".
I'm not new to Access but this seems to me as a beginners problem....
Join our community to see this answer!
Unlock 1 Answer and 17 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros