On 22 mrt, 17:09, "Jeff Gaines" <jgaines_new...@yahoo.co.uk> wrote:
> I want to retrieve the current maximum value of a numeric field in an
> Access 2007 table. I am writing the function in C#. I have a select string
> as follows:
>
> "SELECT LedgerReference, MAX(LedgerReference) *FROM tblLedgerData GROUPBY
> LedgerReference";
>
> Although it appears to work, i.e. it doesn't crash, it doesn't actually
> return anything.
>
> All the examples I have found so far are quite complex with joined tables,
> I just want the maximum value that exists in a single table.
>
> Can anybody give me some guidance please?
>
> --
> Jeff Gaines Dorset UK
> You can't tell which way the train went by looking at the tracks
Maybe this is what you want:
SELECT MAX(LedgerReference) AS Max FROM tblLedgerData
Groeten,
Peter
http://access.xps350.com