Hi everyone,
I am working on a database as a student intern and I am gradually learning access and VBA as I go along, so put simply, I am no expert.
Currently, I have a form which displays 5 check boxes. Depending on information from a previous form, some of these check boxes may dissapear because they are not needed as an option. Depending on the user, the visible check boxes can be clicked or unclicked and that will update the information on that previous form.
This is some of my code so far:
My question is if the check box is no longer visible but is called in a conditional statement, how does VB interpret that?
I will appreciate any guidance, thanks
I am working on a database as a student intern and I am gradually learning access and VBA as I go along, so put simply, I am no expert.
Currently, I have a form which displays 5 check boxes. Depending on information from a previous form, some of these check boxes may dissapear because they are not needed as an option. Depending on the user, the visible check boxes can be clicked or unclicked and that will update the information on that previous form.
This is some of my code so far:
Code:
If Forms!SchedView!SchedStatus = "Approved" Then 'this is the first form
If chkPM.Value = 0 Then 'check box on second form is false
MsgBox " the PM has not approved", vbOKOnly
Forms!SchedView!SchedStatus = "Unapproved-PM" 'update first form
End If
If chkLB.Value = 0 Then
MsgBox " the LB has not approved", vbOKOnly
Forms!SchedView!SchedStatus = "Unapproved-LB"
End If
If chkSMMB.Value = 0 And chkCSDAB.Value = 1 And chkTCB.Value = 1 Then
Forms!SchedView!SchedStatus = "Unapproved-SMMB"
End If
If chkCSDAB.Value = 0 And chkSMMB.Value = 1 And chkTCB.Value = 1 Then
Forms!SchedView!SchedStatus = "Unapproved-CSDAB"
End If
If chkTCB.Value = 0 And chkSMMB.Value = 1 And chkCSDAB.Value = 1 Then
Forms!SchedView!SchedStatus = "Unapproved-TCB"
End If
'...(more conditional statements that are similar conceptually)
End If
My question is if the check box is no longer visible but is called in a conditional statement, how does VB interpret that?
I will appreciate any guidance, thanks
