Results 1 to 3 of 3
  1. #1
    lonesoac0 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Aug 2014
    Posts
    36

    Cool automatically choosing the right exchange server

    Hello all,



    I am writing an access application to help with account creation at my work. I am having an issue in getting the exchange server auto selection to work. How I have things setup is that I have most of my code in the After Insert. So after the basic information is input more information is generated based off of the original information and placed into a separate table. We place our user mailboxes on servers with the most space. An example that we have are servers named Atlanta01, Atlanta02, Atlanta03, Knoxville01, Knoxville02, and Knoxville03. So the first thing that I must determine is to select the proper location pool like Knoxville. Then out of that pool I need to select the server with the highest available space. Any assistance would be greatly appreciated.
    Attached Thumbnails Attached Thumbnails related_tables.PNG   showing_relationship.PNG   snipet_of_code.PNG  
    Attached Files Attached Files

  2. #2
    lonesoac0 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Aug 2014
    Posts
    36
    So, I had a guy look at my situation and he wrote me some code and said buh-bye before I could get it working. Anyone know how to decifer this?

    select substring(name,1,6) name, max(avaiblenewmailboxspace) avaiblenewmailboxspace from dailyreport
    group by name

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The substring function is the SQL Server equivalent of the Mid() function in Access. In this usage, it will return the first 6 characters in the Name field. Basically that's SQL that will return the largest value in the avaiblenewmailboxspace field for each unique instance of the first 6 characters in the name field. The intent appears to be ignoring the numeric digits at the end, but guessing that there will be at least 6 non-numeric characters and that the first 6 characters won't duplicate (like Atlanta and Atlantic would).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form for foreign Exchange
    By drunkenneo in forum Forms
    Replies: 10
    Last Post: 04-17-2014, 07:26 PM
  2. Replies: 6
    Last Post: 01-17-2014, 03:43 PM
  3. Replies: 1
    Last Post: 12-04-2012, 09:39 PM
  4. Access to Excel Exchange
    By uaguy3005 in forum Import/Export Data
    Replies: 5
    Last Post: 07-02-2012, 11:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums