Max value

M

Mike

Hi,
I use ="Latest Version: " &
Nz(DLookup("[Version]";"[FILEVERSION]");"????")
to show the latest version stored in tblfileversion. However, it always
shows the data stored in table's ID 1. I've data stored in ID 2, etc.
I tried ..."Max([Version])"... with no avail. Can someone help me out pls.
Rgs,
Mike
A07 SQL05
 
M

Maurice

Mike,

Why not use a where statement in your dlookup where you point to ID2

something like:

="Latest Version: " & Nz(DLookup("[Version]";"[FILEVERSION]");"ID=ID2")
hth
 
B

BruceM

DMax may be what you need rather than DLookup. What field determines the
latest version? That is, is the latest version the one with the most recent
date, or what exactly?
 
M

Mike

I guess I din't explain myself well, sorry.
table_id (1, 2, 3...) is autonumber
*version* contains the latest version.
My expression always picks up the version from table_id 1. New versions
stored in table_id 2, 3, etc. are ignored.
I tried Dmax, it picks up the information from table_id 2 whereas the latest
version is stored in table_id 10.
Thank you much.

BruceM said:
DMax may be what you need rather than DLookup. What field determines the
latest version? That is, is the latest version the one with the most
recent date, or what exactly?

Mike said:
Hi,
I use ="Latest Version: " &
Nz(DLookup("[Version]";"[FILEVERSION]");"????")
to show the latest version stored in tblfileversion. However, it always
shows the data stored in table's ID 1. I've data stored in ID 2, etc.
I tried ..."Max([Version])"... with no avail. Can someone help me out
pls.
Rgs,
Mike
A07 SQL05
 
M

Mike

Sorry again. DMax did work. It was a problem with the table's field numeric
value.

Mike said:
I guess I din't explain myself well, sorry.
table_id (1, 2, 3...) is autonumber
*version* contains the latest version.
My expression always picks up the version from table_id 1. New versions
stored in table_id 2, 3, etc. are ignored.
I tried Dmax, it picks up the information from table_id 2 whereas the
latest version is stored in table_id 10.
Thank you much.

BruceM said:
DMax may be what you need rather than DLookup. What field determines the
latest version? That is, is the latest version the one with the most
recent date, or what exactly?

Mike said:
Hi,
I use ="Latest Version: " &
Nz(DLookup("[Version]";"[FILEVERSION]");"????")
to show the latest version stored in tblfileversion. However, it always
shows the data stored in table's ID 1. I've data stored in ID 2, etc.
I tried ..."Max([Version])"... with no avail. Can someone help me out
pls.
Rgs,
Mike
A07 SQL05
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top