MsgBox in SQL

  • Thread starter Thread starter Ernie
  • Start date Start date
E

Ernie

How can I implement the following so that a message box apperars if
ProjectClosed=-1

SELECT tblA.Project#, tblA.ProjectClosed
FROM tblA
IF tblA.ProjectClosed=-1
THEN MsgBox "This Project# has been closed", vbOKonly
ELSE
SELECT ...
FROM ...
WHERE ... ;

The last 3 commands work but I can't implement the IF ... THEN ... ELSE phrase
Regards,
Ernie
 
The select statement works on a set of records. You can't do what you want
using the method you want.

What are you attempting to do? You might need to create a recordset and loop
through it.
 
Back
Top