Hi,
When I open a form I want to determine which record is the last in the
tblCases. I've created a query where I copied the SQL code.
But when I want to give the output to MyVar, the content is "Dim strGetSQL
As String strGetSQL = "SELECT Max(tblCases.Casenummer) AS MaxVanCasenummer "
& "FROM tblCases " & "ORDER BY Max(tblCases.Casenummer);"
But I want the value of the keyrecord which name is Casenummer
This is my code
Dim strGetSQL As String
strGetSQL = "SELECT Max(tblCases.Casenummer) AS MaxVanCasenummer " _
& "FROM tblCases " _
& "ORDER BY Max(tblCases.Casenummer);"
MyVar = strGetSQL
What am I doing wrong?
Thanks in advance.