Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    That is what I ended up doing, repeating the code. Very irritating, when there were only 3 lines that were different - total maintenance headache.

    I guess what I was hoping for was to be able to populate some type of variable with either "tdf" or "qdf" along with their respective collection pointers so that my "For each.." statement would use variables previously populated with those values. I am sure there must be a way, just far above my expertise level!

  2. #17
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Yeah, I am not seeing a way to avoid multiple For Each statements. It is possible to pass an Object to a function after it has been instantiated. I am just not seeing how to implement that in this case. At least doing that in a way that helps the cause. As I mentioned, the best would be to build a function for each type and call that function when needed. Integrate the dynamics you desire in how a function is called.

    Create a function for each object type. Keep in mind the "Separation of Concerns" principal.

  3. #18
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Every cell in my body is cringing at the thought of all that repeated code - somewhere in my background must have been someone standing over me with a big stick! Or maybe I've just been bitten too many times over it.

    Thanks for all your help and suggestions, appreciate the feedback.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Conditional Formatting not "fireing" as expected
    By GraeagleBill in forum Forms
    Replies: 11
    Last Post: 02-14-2016, 06:31 AM
  2. Replies: 18
    Last Post: 01-07-2016, 11:37 PM
  3. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  4. Conditional Formatting using "Expression is:"
    By TToc2u in forum Programming
    Replies: 1
    Last Post: 07-20-2013, 08:05 PM
  5. Replies: 1
    Last Post: 08-09-2012, 08:21 AM

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