[Solved] Simple VBA If/Then Statement Not Working
I have 2 combo lists that are formatted to Medium Time with the following values for the row source:
PartyTimeCombo: "10:30 AM";"12:30 PM"
EndTimeTxt: "1:30 PM";"3:30 PM"
I have the following event procedure as an AfterUpdate function for PartyTimeCombo:
For some reason it doesn't work. It's been like that since I made it--over a year ago. I never bothered looking too much into it because it's not that big of a deal. But now I'm going through and streamlining some stuff in the code so figured I'd try to fix it.
Anyone have any ideas? And no, Compact/Repair doesn't do anything and nothing comes up with Compiling the code under the Debug option menu.
I have 2 combo lists that are formatted to Medium Time with the following values for the row source:
PartyTimeCombo: "10:30 AM";"12:30 PM"
EndTimeTxt: "1:30 PM";"3:30 PM"
I have the following event procedure as an AfterUpdate function for PartyTimeCombo:
Code:
Private Sub PartyTimeCombo_AfterUpdate()
If Me.PartyTimeCombo = "10:30 AM" Then
Me.EndTimeTxt = "12:30 PM"
ElseIf Me.PartyTimeCombo = "1:30 PM" Then
Me.EndTimeTxt = "3:30 PM"
End If
DoCmd.RunCommand acCmdRefresh
End Sub
Anyone have any ideas? And no, Compact/Repair doesn't do anything and nothing comes up with Compiling the code under the Debug option menu.
Last edited: