MAX comparsion

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

Guest

I have a text box that i want a value to automatically generate when i click
upon the box or on a button.
I am trying to use the MAX function to find the Highest "Part No" (8 digits)
and where "Group" = "........" (The value for Group will be choosen in a
previous box) and then place the value in the box that you have just clicked.
Where and how do I program this code.
All help very appreciated,
thanks Conor.
 
Hi,
perhaps you need a DMax function:

me.TextBox1=DMax("[Part No]", "YourTable", "[Group]= " & me.MyCombo)

if group has text values - then you have to put value in quotes:

me.TextBox1=DMax("[Part No]", "YourTable", "[Group]= '" & me.MyCombo & "'")
 
Back
Top