gdev
Technical User
- Mar 12, 2001
- 38
Hi Everyone,
How I can make an autonumber increment after
dlookup does it thing to make sure there isn't a record matching the new entries?
As soon as I select the plan, autonumber increments which makes the if statement always true. I don't want autonumber to increment until after dlookup checks for matching records.
Or is there a better way to do this?
If (Not IsNull(DLookup("[CostCenterid]", "tCostCenter", "[costcentercode] ='" & [costcentercode] & "'" & "And [costCenterRegion] = '" & [costCenterRegion] & "'" & "And [planid] = " & [planId]))) Then
MsgBox "stop", vbOKOnly
Me.BusinessContactName.Enabled = False
Me.ControllingContactName.Enabled = False
Me.costCenterType = False
Else
Me.BusinessContactName.Enabled = True
Me.ControllingContactName.Enabled = True
Me.costCenterType.Enabled = True
End If
Thanks
Gwen
How I can make an autonumber increment after
dlookup does it thing to make sure there isn't a record matching the new entries?
As soon as I select the plan, autonumber increments which makes the if statement always true. I don't want autonumber to increment until after dlookup checks for matching records.
Or is there a better way to do this?
If (Not IsNull(DLookup("[CostCenterid]", "tCostCenter", "[costcentercode] ='" & [costcentercode] & "'" & "And [costCenterRegion] = '" & [costCenterRegion] & "'" & "And [planid] = " & [planId]))) Then
MsgBox "stop", vbOKOnly
Me.BusinessContactName.Enabled = False
Me.ControllingContactName.Enabled = False
Me.costCenterType = False
Else
Me.BusinessContactName.Enabled = True
Me.ControllingContactName.Enabled = True
Me.costCenterType.Enabled = True
End If
Thanks
Gwen