End If without block If problem

A|ex

Registered User.
Local time
Today, 10:10
Joined
Jul 11, 2004
Messages
90
Private Sub RepCommissionBoxGroup_AfterUpdate()

If Me.ckbRepCom1 = True Then Me.tboCashCommission = Me.tboRepComFig1
End If

If Me.ckbRepCom2 = True Then Me.tboCashCommission = Me.tboRepComFig2
End If

If Me.ckbRepCom3 = True Then Me.tboCashCommission = Me.tboRepComFig3
End If

If Me.ckbRepCom4 = True Then Me.tboCashCommission = Me.tboRepComFig4
End If

If Me.ckbRepCom5 = True Then Me.tboCashCommission = Me.tboRepComFig5
End If

End Sub


Can anyone tell me whats wrong with my vba?
 
For starters, I think you can do this:

If Me.ckbRepCom1 = True Then Me.tboCashCommission = Me.tboRepComFig1
If Me.ckbRepCom2 = True Then Me.tboCashCommission = Me.tboRepComFig2
If Me.ckbRepCom3 = True Then Me.tboCashCommission = Me.tboRepComFig3
If Me.ckbRepCom4 = True Then Me.tboCashCommission = Me.tboRepComFig4
If Me.ckbRepCom5 = True Then Me.tboCashCommission = Me.tboRepComFig5

???
ken
 
thats what i did originally and it threw a whobbly saying i was missing End If ;)
 
Then have you tried:

If Me.ckbRepCom1 = True Then Me.tboCashCommission = Me.tboRepComFig1
End If

If Me.ckbRepCom2 = True Then
Me.tboCashCommission = Me.tboRepComFig2
End If

If Me.ckbRepCom3 = True Then
Me.tboCashCommission = Me.tboRepComFig3
End If

If Me.ckbRepCom4 = True Then
Me.tboCashCommission = Me.tboRepComFig4
End If

If Me.ckbRepCom5 = True Then
Me.tboCashCommission = Me.tboRepComFig5
End If

End Sub


(What does tbo stand for in Me.tboCashCommission?)

??
ken
 
puttign them on another line i dont think will work tbo = textbox ;)
 
could this be the problem

Me.tboCashCommission = Me.tboRepComFig1

making a textbox = a textbox? would i need to first move the variables into a temp thing then make the temp equal teh textbox?
 
Run-time 2427

you entered an expression that has no value

thats what it says!??!?!
 

Users who are viewing this thread

Back
Top Bottom