A
Alain
Hi to All,
I am getting the following error in my SELECT statement:
Expected: line number or label or statement or end of statement, I have many
combination of quotes mark where I thing they should go but still getting
the same error but on different lenght of my Select statement.
(It looks like this is one of the things that is very difficult for me to
catch up or maybe Access make ot very difficult to code
)) )
Any help understanging this will be greatly appreciated
Public Sub NewRefNo(ref As Integer)
Dim db As DAO.Database
'Dim rst As DAO.Recordset
Dim temp As Integer
Set db = CurrentDb
temp = CurrentDb.Execute_
"SELECT Max(Right([ReferenceNo]),3) FROM tblProperty WHERE
Left([ReferenceNo], 3)=" & ref "",
dbFailOnError
End Sub
Alain
I am getting the following error in my SELECT statement:
Expected: line number or label or statement or end of statement, I have many
combination of quotes mark where I thing they should go but still getting
the same error but on different lenght of my Select statement.
(It looks like this is one of the things that is very difficult for me to
catch up or maybe Access make ot very difficult to code

Any help understanging this will be greatly appreciated
Public Sub NewRefNo(ref As Integer)
Dim db As DAO.Database
'Dim rst As DAO.Recordset
Dim temp As Integer
Set db = CurrentDb
temp = CurrentDb.Execute_
"SELECT Max(Right([ReferenceNo]),3) FROM tblProperty WHERE
Left([ReferenceNo], 3)=" & ref "",
dbFailOnError
End Sub
Alain