I have a procedure in Excel that writes data to an Access table. This all works fine but the thing I haven't been able to figure out is how to get the maximum Auto-ID value in the table it's writing to. Below is a sample of the code I have, so you can get the jist of what I'm trying to do.

Please Login or Register  to view this content.
I'm thinking the only thing I probably need to change is the "varGetID= Max(.Fields("AutoID"). I'm using the wrong reserved word "Max", I need to know what syntax I would use for that. Any help would be appreciated.