Hi,
I have the following code that is returning a "Runtime error 3058, Index or primary key cannot contain a Null value". Error happens on the Update.
Set db = CurrentDb
Dim rstWattage As Recordset
Set rstWattage = db.OpenRecordset("SELECT [Circuit Operating Load] FROM tblLineID where tblLineID.[Line ID] = '" & strLineID & "'")
If rstWattage.RecordCount = 0 Then
With rstWattage
.AddNew
![Circuit Operating Load] = "0"
.Update
End With
End If
Any ideas?
Thanks in advance!