Invald or Primary Key Cannot contain a null value

Invald or Primary Key Cannot contain a null value

Post by QWxle » Thu, 07 Sep 2006 02:52:01


Can anyone tell me why I might be getting this message when I add the
following code in the AfterUpdate event of one of my 3 primary key fields in
my table called NewParts, which has a left join to the below table
ExcelBRefParts in my query, which is the data source for my form. When I
click Close, I get the message, but all three primary key fields are
complete. Any ideas? Thanks much.

Me.Act_New_Part_Var_Cost = DLookup("[Variable]", "ExcelBRefParts", "[PART#]
= [New Part#] And [AS PART#] = [New Part NHL] And [Model#] = [Model]")
 
 
 

Invald or Primary Key Cannot contain a null value

Post by QmFycnkgR2 » Thu, 07 Sep 2006 03:40:02

If you have it working for dates, the only difference is to get your code to
see only the time portion of the control's value. Try using the TimeValue()
function.

Barry

 
 
 

Invald or Primary Key Cannot contain a null value

Post by QWxle » Thu, 07 Sep 2006 05:42:02

Dates? There are no date fields in my form.
 
 
 

Invald or Primary Key Cannot contain a null value

Post by QmFycnkgR2 » Thu, 07 Sep 2006 05:46:01

Sorry. Somehow my response to another posting made it to this one.
Multi-tasking seems to be my downfall today.

Barry