Hi.
I have 2 txtfields to generate an ID in my form, but they are not working.
Here's the code:
Private Sub SSpaceH_AfterUpdate()
Dim SSpaceW As String, SSpaceH As String
SSpaceW = Me!SSpaceW
SSpaceH = Me!SSpaceH
Select Case (SSpaceW And SSpaceH)
Case ("10" And "10"
: Me![SSpaceType] = "1010"
Case ("10" And "20"
: Me![SSpaceType] = "1020"
Case ("10" And "15"
: Me![SSpaceType] = "1015"
Case ("15" And "10"
: Me![SSpaceType] = "1510"
Case ("20" And "10"
: Me![SSpaceType] = "2010"
Case ("20" And "20"
: Me![SSpaceType] = "2020"
End Select
End Sub
SSpaceW, SSpaceH, SSpaceType are all text fields. It works with some sets but not all of them.
For example, it works with (10 And 10), (10 and 20), (20 and 20).
What is wrong with this IF statement?
I have 2 txtfields to generate an ID in my form, but they are not working.
Here's the code:
Private Sub SSpaceH_AfterUpdate()
Dim SSpaceW As String, SSpaceH As String
SSpaceW = Me!SSpaceW
SSpaceH = Me!SSpaceH
Select Case (SSpaceW And SSpaceH)
Case ("10" And "10"
Case ("10" And "20"
Case ("10" And "15"
Case ("15" And "10"
Case ("20" And "10"
Case ("20" And "20"
End Select
End Sub
SSpaceW, SSpaceH, SSpaceType are all text fields. It works with some sets but not all of them.
For example, it works with (10 And 10), (10 and 20), (20 and 20).
What is wrong with this IF statement?