Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show Msgbox

Status
Not open for further replies.

LiLgUrL

Technical User
Feb 9, 2003
59
CA
greetings! I don't know if I'm thinking possible or impossible here... i am using a simple query that will add or subtract... With the subtract function i want to show a message box if the Qty (difference) is negative... coz my table should not contain a negative value... it should show an error. Im using a DoCmd.RunSQL "blah blah blah..." how to restrict it and if possibe how to show a message box or anything that will prompt the user that there's something wrong... Please adivice...

Regards,
Gwen
 
Hi ShyGurl,

I think we need a little more detail. DoCmd.RunSQL runs an ACTION query, in other words it updates your database, it does not return details of all updated records for you to check. I guess what you need to do is limit the update so that records with negative values aren't updated and then separately, before or after, report (using a SELECT query) on those records which would have produced the negatives. If you post your SQL someone will help.

On a housekeeping note, questions which are purely about Access are best posted in one of the Access forums. Although there are usually people here who can answer, there are far more of them (us?) there.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top