knightwest
Registered User.
- Local time
- Today, 00:00
- Joined
- Apr 18, 2007
- Messages
- 16
Hi,
I am fairly new to VBA.
I am trying to split policy numbers from a field in an access table containing more text than just the policy number. This is the VBA we use in Excel, it looks at all the different types and isolates them:
FindText(1) = "*[A-Z][A-Z]#######[A-Z][A-Z][A-Z]*"
TextLength(1) = 12
RefType(1) = "Full"
FindText(2) = "*[A-Z][A-Z]#######[A-Z][A-Z]*"
TextLength(2) = 11
RefType(2) = "Full"
FindText(3) = "*87########[A-Z]##*"
TextLength(3) = 13
RefType(3) = "Full"
FindText(4) = "*87# #######[A-Z]##*"
TextLength(4) = 14
RefType(4) = "Full"
FindText(5) = "*[A-Z][A-Z]#######[A-Z]*"
TextLength(5) = 10
RefType(5) = "Part"
FindText(6) = "*#######[A-Z]*"
TextLength(6) = 8
RefType(6) = "Part"
FindText(7) = "*5######*"
TextLength(7) = 7
RefType(7) = "Full"
How can I use this code in access to do the same thing. We have to move this stuff to access because my boss wants it there.
Thanks
Knightwest
I am fairly new to VBA.
I am trying to split policy numbers from a field in an access table containing more text than just the policy number. This is the VBA we use in Excel, it looks at all the different types and isolates them:
FindText(1) = "*[A-Z][A-Z]#######[A-Z][A-Z][A-Z]*"
TextLength(1) = 12
RefType(1) = "Full"
FindText(2) = "*[A-Z][A-Z]#######[A-Z][A-Z]*"
TextLength(2) = 11
RefType(2) = "Full"
FindText(3) = "*87########[A-Z]##*"
TextLength(3) = 13
RefType(3) = "Full"
FindText(4) = "*87# #######[A-Z]##*"
TextLength(4) = 14
RefType(4) = "Full"
FindText(5) = "*[A-Z][A-Z]#######[A-Z]*"
TextLength(5) = 10
RefType(5) = "Part"
FindText(6) = "*#######[A-Z]*"
TextLength(6) = 8
RefType(6) = "Part"
FindText(7) = "*5######*"
TextLength(7) = 7
RefType(7) = "Full"
How can I use this code in access to do the same thing. We have to move this stuff to access because my boss wants it there.
Thanks
Knightwest