Query/Report

R

Ron Darby

I would like to put a command button on a form, that would determine what the maximum value was in a field of a table and then print a specific report depending on the maximum value in the field. I have 5 possible forms.
 
S

Steve Schapel

Ron,

Here's one way. Use a VBA procedure on the On Click event of the
command button, the equivalent of...
DoCmd.OpenReport "YourReport", , , "YourField =
DMax('[YourField]','YourTable')"
 
Top