[2007] Dlookup #error

Meinthecorner

Registered User.
Local time
Today, 16:59
Joined
Nov 29, 2008
Messages
25
Anybody help with this annoyance.

I've a continuous form that uses dlookup to grab a part description from a separate table. However on the records that yet to have a value selected I'm getting a #error in the dlookup field.

The Control source is

Code:
=DLookUp("partdescription","tbl_parts","partid = " & [Forms]![frm_Repairs]![frm_Repairs_Sub].[Form]![PartNumber])
)

Which works fine and lists the correct part description, apart from the annoying #error.

If I change the dlookup to

Code:
=DLookUp("[partdescription]","tbl_parts","[partid] = Form![partnumber]")

And set the Combo box to requery the [partdescription] field, it works fine and the #error goes....But this forces every record on the form to requery, which is just annoying.

I've tried adding an IIF statement to the start, but this simply doesnt make a difference and the #error remains.

Any idea's folks?
 

Users who are viewing this thread

Back
Top Bottom