First Letter

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
 
D

Dirk Goldgar

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.
 
G

Gee

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top