VBA code help for a message box to display breach of a condition

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adulu Miller
    New Member
    • Sep 2015
    • 8

    #1

    VBA code help for a message box to display breach of a condition

    I am working on a database and would require some assistance.

    This database is a furniture shop management system and a carpenter cannot process more than four jobs.

    I have worked out a query to count the number of jobs each carpenter has and now I need a VBA code to run before allocating an already occupied carpenter wit more jobs to alert the user to release him of some of the jobs.

    I would like the code to get the job numbers for that carpenter from the query and if they are more than four to prompt the user to release some otherwise to accept that the carpenter can be allocated another job.

    Once the job is finished i need to release the carpenter of that job in order to allocate him another job.

    Any help is already highly appreciated.
    Last edited by Adulu Miller; Sep 10 '15, 12:53 PM. Reason: Remove e-mail address
  • jforbes
    Recognized Expert Top Contributor
    • Aug 2014
    • 1107

    #2
    If you are using a ComboBox to select a Carpenter against a Job, I would Filter the ComboBox to display Carpenters under the Job allocation limit.
    Another option is to put a validation rule on the BeforeUpdate event of the ComboBox that checks to see if the selected Carpenter is available.

    If you are going about this in a different manner, let us know.

    Comment

    • Adulu Miller
      New Member
      • Sep 2015
      • 8

      #3
      Thank you very much jforbes. I will try that ASAP and let you know of the out come

      Comment

      Working...