How Do i Create A Custom Msg Box

Dirk2512

Registered User.
Local time
Today, 11:05
Joined
Dec 29, 2006
Messages
15
I have a database for call outs, i had a problem with double booking, but cured that, my problem now is every time my work mates try to book me in that go into the debug box (accidently) all i need is a ok button only msgbox to say the time is already booked. can anyone plaease help.

here is my db if any one want to have a look
 

Attachments

Add this first in the code behind the button:
Code:
  If DCount("*", "table1", "date = #" & Me.Date & "# AND Time = #" & Me.Time & "#") > 0 Then
    MsgBox "Date/time combination already exists"
    Exit Sub
  End If

By the way, "date", "time" etc are not good names for fields, as they are reserved words. Also, spaces are not a good idea in your names:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;209187
 
Thanks

Thats great thanks alot
 

Users who are viewing this thread

Back
Top Bottom