Can anyone please help me out with this:
LoanInfo table:
LoanNum
1A
2A
3A
4A
5A
6A
7A
8A
9A
10A
I want to get the maximum number (which is 10) in the table so I can increase 1 unit for the next LoanNum (11A).
I have a sql statement works in sql database but when I use CInt, it doesn't work in VBA Access.
This is my sql statement
SELECT MAX(convert(int,Left(LoanNum, Len(LoanNum) - 1))) AS LoanNum
FROM LoanInfo
WHERE right(LoanInfo.LoanNum, 1) = 'A'
Thanks in advance!
LoanInfo table:
LoanNum
1A
2A
3A
4A
5A
6A
7A
8A
9A
10A
I want to get the maximum number (which is 10) in the table so I can increase 1 unit for the next LoanNum (11A).
I have a sql statement works in sql database but when I use CInt, it doesn't work in VBA Access.
This is my sql statement
SELECT MAX(convert(int,Left(LoanNum, Len(LoanNum) - 1))) AS LoanNum
FROM LoanInfo
WHERE right(LoanInfo.LoanNum, 1) = 'A'
Thanks in advance!