If Then Statement Based on Combobox (1 Viewer)

Kroghr

Registered User.
Local time
Tomorrow, 03:42
Joined
Oct 20, 2008
Messages
17
Can someone please tell me why this will not work?

Me.Destination is a combobox with values of KWA ROI MAJ WAK
TxtTOTALWEIGHT is Unbound Calculated field
Me.TxtMAXWEIGHT is Unbound Text box


Private Sub TxtTOTALWEIGHT_AfterUpdate()
If Me.Destination = "KWA" Or Me.Destination = "ROI" Then
Me.TxtMAXWEIGHT = "14200"
Else
If Me.Destination = "MAJ" Or Me.Destination = "WAK" Then
Me.TxtMAXWEIGHT = "14500"
End Sub
 

Steve R.

Retired
Local time
Today, 11:42
Joined
Jul 5, 2006
Messages
4,687
I think you need to place the subroutine into the "on click event".

Before moving the function, test it out with the debug.print command to see what you are getting as a result. Move to the "on click event" and recheck.
 

Users who are viewing this thread

Top Bottom