Return message based on query result
From: Bruce (anonymous_at_discussions.microsoft.com)
Date: 05/20/04
- Next message: Ken Snell: "Re: Return message based on query result"
- Previous message: Douglas J. Steele: "Re: ActiveX Data Objects Libraries References"
- Next in thread: Ken Snell: "Re: Return message based on query result"
- Reply: Ken Snell: "Re: Return message based on query result"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 May 2004 20:26:04 -0700
How do I you code to give some meaningful error message based on a queries result. I have 2 situations to that I would like help on.
I have a series of select queries that essentially are checking data intergrity in my database. (n.b. Not referential Integrity).
Essentially, if the query result is NULL then integrity is intact. However if not then the records with discrepancies are returned.
rather that open all these queries and view myself, is there a way to do this from code that basically tells me which queries are in error.
e.g.
if qry_integrity is not null then
msgbox("There are integrity issues".)
End
Else
msgbox("Ok")
The second I would like to do I add some code to a macro that runs an into into (Append) query). I have turned off set warnings.
Basically is the append is successful it should tell the use "Record added successfully". If not "The record could not be added".
Any help appreciated
Bruce
- Next message: Ken Snell: "Re: Return message based on query result"
- Previous message: Douglas J. Steele: "Re: ActiveX Data Objects Libraries References"
- Next in thread: Ken Snell: "Re: Return message based on query result"
- Reply: Ken Snell: "Re: Return message based on query result"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|