Hi all
I have a sql statement in VB to return the max number from an access table called data and then i need to write that max id in another table (with some other fields)
Name.SetFocus
Tkt_Query = “SELECT MAX[(ID)] FROM [data] where [name] = ‘” & Name.Text & “‘ order by ID”
Set db = CurrentDb()
Set RS_Ticket = db.OpenRecordset(“data”, dbOpenDynaset)
However the select statment brings back the first occurance, not the max. Any ideas why this would happen?
Tia
Sheila