petercummins
Registered User.
- Local time
- Today, 13:56
- Joined
- Sep 6, 2005
- Messages
- 52
Hello,
Is there a way of changing VB code so that ONLYif a statement is true then the command runs.
This is what I currently have:
If Me.chkDoorChoice = True And Me.cboFrontDoorType = "N/A" Or Me.cboFrontDoorColour = "N/A" Or Me.cboRearDoorType = "N/A" Or Me.cboRearDoorColour = "N/A" Or Me.cboAdditionalDoorType = "N/A" Or Me.cboAdditionalDoorColour = "N/A" Then
DoCmd.RunMacro "mcrPleaseNote"
End If
So the command should only run when chkDoorChoice is true. There are occasions when cbofrontdoortype = "N/A" and chkDoorChoice = False and the macro still runs. I dont want this to happen.
Any ideas peeps?
Is there a way of changing VB code so that ONLYif a statement is true then the command runs.
This is what I currently have:
If Me.chkDoorChoice = True And Me.cboFrontDoorType = "N/A" Or Me.cboFrontDoorColour = "N/A" Or Me.cboRearDoorType = "N/A" Or Me.cboRearDoorColour = "N/A" Or Me.cboAdditionalDoorType = "N/A" Or Me.cboAdditionalDoorColour = "N/A" Then
DoCmd.RunMacro "mcrPleaseNote"
End If
So the command should only run when chkDoorChoice is true. There are occasions when cbofrontdoortype = "N/A" and chkDoorChoice = False and the macro still runs. I dont want this to happen.
Any ideas peeps?