Hi all,
I am writing an application to parse a text file, and each portion contains header information, then detail information. I need to relate the detail info the header info, and I want to do this by storing the primary key of the header autonumber field into a related field in the details table. My question is, how do obtain the highest number in a particular field in a table?
For instance, if the primary key of the headers table looked like this:
Key: 11
Key: 13
Key: 14
Key: 15
Key: 17
How would I write, in VBA, the code to pull 17, which is the highest primary key found?
Thanks! Sorry if it sounds confusing
I am writing an application to parse a text file, and each portion contains header information, then detail information. I need to relate the detail info the header info, and I want to do this by storing the primary key of the header autonumber field into a related field in the details table. My question is, how do obtain the highest number in a particular field in a table?
For instance, if the primary key of the headers table looked like this:
Key: 11
Key: 13
Key: 14
Key: 15
Key: 17
How would I write, in VBA, the code to pull 17, which is the highest primary key found?
Thanks! Sorry if it sounds confusing