Trouble with Update query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form which I run some queries to append several records. On of my
queries is an update query, but I can't seem to get it to work properly.
What I want is if an item exist, but does not exist on any of the combo boxes
then set the value to null or even zero. Here is my SQL. I tried to break
it down to using just one combo box to see if it works but it zeros out all
my fields. Can anyone assist me on this? Thanks in advance..

UPDATE tblPracticalData INNER JOIN (tblAttribute INNER JOIN
tblPracticalResults ON tblAttribute.ATTID = tblPracticalResults.Attribute) ON
tblPracticalData.PracticalIDNumber = tblPracticalResults.PracticalIDNumber
SET tblPracticalResults.PointsPossible1 = ""
WHERE (((tblAttribute.Anomaly)=True) AND
((tblPracticalResults.Attribute)<>[forms].[frmpractical].[S1A1] And
(tblPracticalResults.Attribute)<>[forms].[frmpractical].[S1A2] And
(tblPracticalResults.Attribute)<>[forms].[frmpractical].[S1A3] And
(tblPracticalResults.Attribute)<>[forms].[frmpractical].[S1A4]) AND
((tblPracticalData.UniquePracticalIdentifier)=[forms]![frmPractical].[txtUniquePracticalIdentifier]));
 
Never mind I got it. If some of the combo boxes are null then it wouldn't
work. So in my query I had to Nz for each combo box it was looking at.
 
Back
Top