Reading a value from a field in a table into a variable.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wish to read the maximum value from a field in a table into a variable in a
form and having trouble trying to do it.

Example...

Table 1 has 5 fields, Field 1 to 5.

If I wished to read the max value from Field 1 into a variable called
strMax, how would I do this please?

TIA.
 
Thanks very much for the help.

Douglas J Steele said:
strMax = DMax("[Field1]", "[MyTable]")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


DaveO said:
I wish to read the maximum value from a field in a table into a variable in a
form and having trouble trying to do it.

Example...

Table 1 has 5 fields, Field 1 to 5.

If I wished to read the max value from Field 1 into a variable called
strMax, how would I do this please?

TIA.
 
Back
Top