Quote:
Originally Posted by elderboy02
That really is strange. Usually in VB/VBA you have to have your variable on the left. I manage a word template here at work with TONS of lines of code. We use it for a complex exam the physical therapists do. I too have to use hidden fields in order to get the darn thing to work right. VBA really is a b***h to work with.
|
Exactly! It kicks back an "Object Required" error if my variable is on the left...and it doesn't function when the variable is on the right.
I just had a thought. Maybe instead of having it check all of them at once I should have them checking every time the user updates a given field...that might work...I'll be back in a few. Time for more testing.
EDIT: OK. If I
instead run a code that looks like this:
Quote:
Private Sub chkProduction_AfterUpdate()
If [chkProduction] = Yes Then
DLookup("[Production]", "tblUserPCE", "[UserID] = '" & Forms![frmNewUser]![strCurrentUser] & "'") = Yes
Else: [chkProduction] = ""
MsgBox "You may not create a user that can authorize Production issues"
End If
End Sub
|
And force it to check after each update it will work just fine on top of automatically changing the field to "No".
WHY DOES THIS WORK, BUT MY FIRST SOLUTION DOESN'T. *rage*
Posted via Mobile Device