I have some VBA code in Access which inserts data from a form in Access into a Word Document.
Code:
.ActiveDocument.Bookmarks("XXXX").Select
.Selection.Text = (CStr(Forms!frm_Main!ACCOUNT_NUMBER))
The account number in Access is 16 digits long. I have it working to where it will insert the 16 digit account number into Word where I have the (XXXX) bookmarked.
What I need to do is only insert the last 4 digits of the 16 digit account number into word. I need to either remove the first 12 digits, or only select the last 4 digits from the account number.
Any help with this would be greatly appreciated - I can provide more details if necessary.
Thanks
Code:
.ActiveDocument.Bookmarks("XXXX").Select
.Selection.Text = (CStr(Forms!frm_Main!ACCOUNT_NUMBER))
The account number in Access is 16 digits long. I have it working to where it will insert the 16 digit account number into Word where I have the (XXXX) bookmarked.
What I need to do is only insert the last 4 digits of the 16 digit account number into word. I need to either remove the first 12 digits, or only select the last 4 digits from the account number.
Any help with this would be greatly appreciated - I can provide more details if necessary.
Thanks