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

MsgBox Day

Status
Not open for further replies.

Mr2006

Technical User
Jun 21, 2006
80
0
0
US
Hello All,

We have several scheduler in the office who schedule for different people work orders. I want a msgbox to appear if one scheduler try to schedule same employee for different work order that falls between or on the same two dates. (startdate and enddate). It is Ok to schedule, but we need a msgbox letting them know that this provider is already scheduled to do work between those days, do you want to overbook? yes/No. If yes, schedule, if no delete.

I need a msgbox to pop if a work order is being created for employee who have a work order between two dates.

Thanks
 
Mate, No offense but I think you may need to check out the tutorials a little more. I'm always happy to help but you know ;)

Code:
If TestDate >= Me!startdate And testdate <= Me!enddate Then
    MsgBox ("Overlap")
    'delete or whatever
else
    'no drama, do nothin
Endif

That checks your dates - search help for help on checking for confirmation (if msgbox(blah)=vbyes then....) and for deleting record if vbNo

Sure you'll get it from here,

JB
 
Thank you so much for your help. I will try to take it from here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top