Hi
I have a subform which is shown in Continuous Forms view. I have a control called PaintPrice which has an after update event where I need to check if value in the PaintID control is the max, if this is so then I wish to move to other controls.
The problem I am having is selecting the current record before performing and DMAX or Dlookup formulas
Below is what I have come up with so far, this only returns the Max Value message regardless of the value in the control PaintID so need help selecting Current Record
Any thoughts appreciated
If PrimaryKey = DMax("primarykey", "tblenquirypaint", "primarykey= " & Me.PrimaryKey) Then
MsgBox "Max value", vbOKOnly
Thanks
Richard
I have a subform which is shown in Continuous Forms view. I have a control called PaintPrice which has an after update event where I need to check if value in the PaintID control is the max, if this is so then I wish to move to other controls.
The problem I am having is selecting the current record before performing and DMAX or Dlookup formulas
Below is what I have come up with so far, this only returns the Max Value message regardless of the value in the control PaintID so need help selecting Current Record
Any thoughts appreciated
If PrimaryKey = DMax("primarykey", "tblenquirypaint", "primarykey= " & Me.PrimaryKey) Then
MsgBox "Max value", vbOKOnly
Thanks
Richard