dialog box for certain values entered (1 Viewer)

scopes456

Registered User.
Local time
Today, 08:31
Joined
Feb 13, 2013
Messages
89
I have a form that collects a survey where the user selects between 1 to 9. I was wondering if the user selects a certain range, for example between 1 to 4 a yes/no dialog appears. If the user selects a range from 5 to 9 , they get no dialog box.

Thank You.
 

Trevor G

Registered User.
Local time
Today, 13:31
Joined
Oct 1, 2009
Messages
2,341
Do you mean it shows a Check Box on the form?
 

scopes456

Registered User.
Local time
Today, 08:31
Joined
Feb 13, 2013
Messages
89
Hello Tevor ,Thanks for responding. My form has combo box for each question for an employee survey. For each question i can select from 1 to 9. I would like if the user selects a range between 1 to 4, for any question an addition box ( i believe a check box will work) will appear asking the user did they review the employee record, they select yes and the form will save the information. If the users select anything above a 5 the form will just save the information.
 
Last edited:

Trevor G

Registered User.
Local time
Today, 13:31
Joined
Oct 1, 2009
Messages
2,341
Ok here what to do. Open your form in design view. From the toolblx click the Check Box tool and then open the properties for the checkbox. In the properties name the checkbox chkYes and change the Visible to False do the same with the Label. Then select your Combox and in the properties select the Events Tab and select AfterUpdate then click the ellipse button to the right. Select to use the programming element and then add this Case Statement.

Code:
Private Sub cboName_AfterUpdate()
Select Case Me.cboName
Case Is = 1, 2, 3, 4
Me.chkYes.Visible = True
Me.Label1.Visible = True
Case Else
Me.chkYes.Visible = False
Me.Label1.Visible = False
End Select
End Sub
 

scopes456

Registered User.
Local time
Today, 08:31
Joined
Feb 13, 2013
Messages
89
Trevor G, thank you very muchs , works the way i need it to :)
 

Trevor G

Registered User.
Local time
Today, 13:31
Joined
Oct 1, 2009
Messages
2,341
Happy to help and thank you for letting me know you have a working solution.
 

Users who are viewing this thread

Top Bottom