I want to find field "id_zlecenia" - autonumber where field "DataPrzyjecia" - Date is youngest in table "tblZlecenia", I have a problem with WHERE, I know that, should use "#" for a date field, but I don't know how to write it.
Function - I think MAX will be ok.
Function - I think MAX will be ok.
Code:
Dim sSQL As String
Dim rst As Recordset
sSQL = "SELECT id_zlecenia FROM tblZlecenia [COLOR="Red"]WHERE...[/COLOR] "
Set rst = CurrentDb.OpenRecordset(sSQL)
Me.Tekst1 = rst!ID_Zlecenia
rst.Close: Set rst = Nothing