+ Reply to Thread
Results 1 to 4 of 4

How can we summarize this code?

  1. #1
    Forum Contributor
    Join Date
    11-07-2005
    Posts
    280

    How can we summarize this code?

    Hi everyone,

    I have the following code used to fill a listbox control .. and I added some conditions to the code in order to give special authorities to specific users depending on their position and unit?

    Authority, UserPositon and UserUnit are functions give the user's position, unit and his authority.

    Can we summarize the red highlighted parts of the code because I am going to use these parts in many other forms of my project?

    Please Login or Register  to view this content.
    I hope that my question if clear for all,

    Thank you,
    Last edited by LoveCandle; 06-27-2009 at 01:49 PM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How can we summarize this code?

    Hi there,

    Try creating a Boolean function which includes all of the conditions you've highlighted in red, e.g.:

    Please Login or Register  to view this content.
    and then include a reference to this function in your main code, e.g.:
    Please Login or Register  to view this content.
    I hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    11-07-2005
    Posts
    280

    Re: How can we summarize this code?

    Hi,

    It is really an excellent trick .. Thank you for that Greg M.

    Bye,

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How can we summarize this code?

    Hi again,

    Many thanks for your feedback - I'm glad I was able to help.

    Regards,

    Greg M

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1