Calvary
New Member
- Joined
- Jul 14, 2017
- Messages
- 9
Hi All,
I'm having a bit of a problem getting a combo box to do what I'd like.
Esscentially what I want is the combo box to read the text box above called "accnumber" and check the first 2 characters. If they show "CA" then the box should only show "Mobile" else 2 other options.
The section in bold seems to be the issue, If anyone can take a look and see where I've gone wrong I'd appreciate it.
Thanks,
Damien,
I'm having a bit of a problem getting a combo box to do what I'd like.
Esscentially what I want is the combo box to read the text box above called "accnumber" and check the first 2 characters. If they show "CA" then the box should only show "Mobile" else 2 other options.
Code:
With system
If Accnumber.Value = [B]Left(2 = "CA") Then[/B]
.AddItem "Mobile"
Else
.AddItem "R6"
.AddItem "TIS"
End If
End With
End Sub
The section in bold seems to be the issue, If anyone can take a look and see where I've gone wrong I'd appreciate it.
Thanks,
Damien,