Consulting

Results 1 to 4 of 4

Thread: I'm trying to write a validation rule to a drop down menu..is this possible?

  1. #1
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location

    I'm trying to write a validation rule to a drop down menu..is this possible?

    I was wondering if it was possible to write a validation rule on a drop down list that when a start and end times are simultaneous are set another user isn't able to set the same times because an error message occurs...unless the initial times has been cancelled. Is this possible to do? If its not possible to implement as a validation rule or macro is there an alternative way to do this? Thanks for your solutions

  2. #2
    VBAX Regular
    Joined
    Jun 2009
    Location
    Dorset
    Posts
    60
    Location
    Are you ayin you have a start and end time drop-down and if the user selects the same time you need an error?

    If so I woiuld do this in VBA on the afterupdate of the drop-down boxes. Something like this:

    Afterupdate of combo1
    If me!combo1 = me!combo2 then
    msgbox "ERROR: This is the same time!!"
    me!combo1 = null
    end if

    Afterupdate of combo2
    If me!combo2 = me!combo1 then
    msgbox "ERROR: This is the same time!!"
    me!combo2 = null
    end if
    Regards
    JD
    ------------------------------------
    Software-Matters
    Dorset

  3. #3
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location
    Thats right!

  4. #4
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location
    for example is a user booked a session at 5 - 6 on tuesday 21 september, i want to prevent a user booking a customer at the same time...for a session

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •