Current Record Problem

rnutts

Registered User.
Local time
Today, 16:32
Joined
Jun 26, 2007
Messages
110
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'm not sure I understand what you're doing, but you describe wanting to test PaintID, but your DMax is finding "primarykey".
 

Users who are viewing this thread

Back
Top Bottom