- Local time
- Today, 13:05
- Joined
- Feb 28, 2001
- Messages
- 30,035
Here's the scenario. I'm asking if anyone has seen this before or has any comments on what is happening. I'm hoping for suggestions.
We have an ACCESS 2007 front-end with a 2003 back-end, doing it this way for issues with digital signatures. (AC2007 backend does not support digital signatures.)
An update query is triggering a trap that makes no sense to me and I'm tearing out what little is left of my hair on this one. Before anyone asks, the database in question cannot be posted as it contains Sensitive information about U.S. Government computers and networks, and it would take me a LONG time to sanitize it and then still assure that the problem occurs.
We have two tables in question:
tIAV - contains fields such as ActID (autonumber pk), ActName (text), a bunch of other things, and ActIssueDate (date field - not a date-formatted text field, but a true date data type) that records when the original IAV entry was made. [ActIssueDate] is guaranteed to not be null, blank, or zero because of other code on the form that sanitizes it on original data entry. I have taken extreme measures to assure you can't navigate away and do an implied save, you can't close the form without cleaning it up, and a bunch of other things to assure that you correct your data before you commit it.
tSRVIAV - contains fields such as SrvID (long FK to tSRV, not relevant here), ActID (long FK to tIAV, very relevant here), SAStsDate ("true" date field), SADue ("true" date field), and some other things not relevant to the problem.
Table tSRVIAV is a junction table representing a many/many relationship between the two tables, tSRV and tIAV. It is theoretically possible that it would be sparse if a particular SRV/IAV combination does not occur, and in fact we know that older SRV entries that represent decommissioned servers do not have newer IAV entries represented in this table. We don't think this fact is relevant, but I'm trying to anticipate likely questions here.
We use a query, qIAVjSRVIAV that does a SELECT of many fields
"FROM tIAV LEFT JOIN tSRVIAV ON tIAV.ActID = tSRVIAV.ActID;"
which makes this query an explicit statement of the relationship between the tIAV and tSRVIAV tables. When we are processing the tSRVIAV entries only with respect to the tIAV entries, this is the query we use - and this query is central to the problem.
The offending code is in a VBA subroutine and the query says
"UPDATE qIAVjSRVIAV SET [SAStsDate] = [ActIssueDate] WHERE " & sCriteria & " ; "
The sCriteria string merely selects a subset of that join based on the status date being null or before the issue date of the IAV in question. We are, in essence, assuring that when this scan is done, the dates in tSRVIAV will be consistent with the entry dates in tIAV. There is an obscure pathway in which sometimes the user enters something incorrectly and we can't catch it until we run this scan, which is why this code exists in the first place.
OK, now here is the observed trap message, for which my trap handler fills in the name of the open form and the name of the person running the form, but the rest of the message is exactly as is returned by Access.
"User: Richard W Hunt Error trap in SupvOvrVu: IAVSRVSanity, #3314 - You must enter a value in the 'tSRVIAV.SADue' field."
But... this is trap occurred while running an update that isn't touching the SADue field at all. When I open the qIAVjSRVIAV query and scan through the recordset, there are no nulls in that [SADue] field. The only relevant thing I have found so far is that for table tSRVIAV, the [SADue] flag is marked as "Required" - but ...
1. This is not an INSERT INTO, it is an UPDATE for a record that does not have a null for [SADue]
2. The update does not involve the [SADue] field anyway.
Has anyone ever seen anything like this? I think this is incorrect behavior but I'd like a second opinion.
We have an ACCESS 2007 front-end with a 2003 back-end, doing it this way for issues with digital signatures. (AC2007 backend does not support digital signatures.)
An update query is triggering a trap that makes no sense to me and I'm tearing out what little is left of my hair on this one. Before anyone asks, the database in question cannot be posted as it contains Sensitive information about U.S. Government computers and networks, and it would take me a LONG time to sanitize it and then still assure that the problem occurs.
We have two tables in question:
tIAV - contains fields such as ActID (autonumber pk), ActName (text), a bunch of other things, and ActIssueDate (date field - not a date-formatted text field, but a true date data type) that records when the original IAV entry was made. [ActIssueDate] is guaranteed to not be null, blank, or zero because of other code on the form that sanitizes it on original data entry. I have taken extreme measures to assure you can't navigate away and do an implied save, you can't close the form without cleaning it up, and a bunch of other things to assure that you correct your data before you commit it.
tSRVIAV - contains fields such as SrvID (long FK to tSRV, not relevant here), ActID (long FK to tIAV, very relevant here), SAStsDate ("true" date field), SADue ("true" date field), and some other things not relevant to the problem.
Table tSRVIAV is a junction table representing a many/many relationship between the two tables, tSRV and tIAV. It is theoretically possible that it would be sparse if a particular SRV/IAV combination does not occur, and in fact we know that older SRV entries that represent decommissioned servers do not have newer IAV entries represented in this table. We don't think this fact is relevant, but I'm trying to anticipate likely questions here.
We use a query, qIAVjSRVIAV that does a SELECT of many fields
"FROM tIAV LEFT JOIN tSRVIAV ON tIAV.ActID = tSRVIAV.ActID;"
which makes this query an explicit statement of the relationship between the tIAV and tSRVIAV tables. When we are processing the tSRVIAV entries only with respect to the tIAV entries, this is the query we use - and this query is central to the problem.
The offending code is in a VBA subroutine and the query says
"UPDATE qIAVjSRVIAV SET [SAStsDate] = [ActIssueDate] WHERE " & sCriteria & " ; "
The sCriteria string merely selects a subset of that join based on the status date being null or before the issue date of the IAV in question. We are, in essence, assuring that when this scan is done, the dates in tSRVIAV will be consistent with the entry dates in tIAV. There is an obscure pathway in which sometimes the user enters something incorrectly and we can't catch it until we run this scan, which is why this code exists in the first place.
OK, now here is the observed trap message, for which my trap handler fills in the name of the open form and the name of the person running the form, but the rest of the message is exactly as is returned by Access.
"User: Richard W Hunt Error trap in SupvOvrVu: IAVSRVSanity, #3314 - You must enter a value in the 'tSRVIAV.SADue' field."
But... this is trap occurred while running an update that isn't touching the SADue field at all. When I open the qIAVjSRVIAV query and scan through the recordset, there are no nulls in that [SADue] field. The only relevant thing I have found so far is that for table tSRVIAV, the [SADue] flag is marked as "Required" - but ...
1. This is not an INSERT INTO, it is an UPDATE for a record that does not have a null for [SADue]
2. The update does not involve the [SADue] field anyway.
Has anyone ever seen anything like this? I think this is incorrect behavior but I'd like a second opinion.