First Letter

  • Thread starter Thread starter Gee
  • Start date Start date
G

Gee

How do I write this in VBA:

If the first letter in [Model] is "B" then
[TextBox2]="BP"

Thank you in advance for any help you can give me.
Gee
 
Gee said:
How do I write this in VBA:

If the first letter in [Model] is "B" then
[TextBox2]="BP"

Thank you in advance for any help you can give me.


The VBA for that specific logic would be:

If Left([Model], 1) = "B" Then
[TextBox2] = "BP"
End If

That may or may not be what you actually need.
 
EXACTLY what I needed!
Thanks!

Dirk Goldgar said:
Gee said:
How do I write this in VBA:

If the first letter in [Model] is "B" then
[TextBox2]="BP"

Thank you in advance for any help you can give me.


The VBA for that specific logic would be:

If Left([Model], 1) = "B" Then
[TextBox2] = "BP"
End If

That may or may not be what you actually need.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
Back
Top