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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple message box

Status
Not open for further replies.

joeythelips

IS-IT--Management
Aug 1, 2001
305
IE
Hi,

I import a file every day.
When the file is exported, a table is created that has 3 fields:
Filename
Date Received
Successful.
Sucessful will be equal to 1 if the file has imported properly and 0 if it hasn't.
What i want to do is, after import, see a message box appear saying "File import successful" if the field successful equals one or "Unsuccessful" if it equals 0.

Can someone please help me out?

Joe
 
If DLookup("[SuccessFul]","MyTableName") = 1 Then
MsgBox "Successful!"
Else
MsgBox "Unsuccessful!"
End If

HTH Joe Miller
joe.miller@flotech.net
 
Well, I'd use DLookup and a msgbox... You may need to tinker with the date criteria


Sub Import_OnClick()

If Dlookup("yourtable","Successful","Date Received" = Date()) = 1 Then
Msgbox ("Import Successful")
Else
Msgbox ("Import unsuccessful")
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top