Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862


    Quote Originally Posted by ahoneycutt View Post
    What would the MyPlan#Function look like?
    I would probably develop a formula using values from a table that would indicate upper threshold, lower threshold, percentage, etc.

    Develop your formula using variables. You can hard code the values of your variables while you develop your code. Later, you can place the values in a table, where your variables can reference them. Create the table after testing that your function works.

    If you use a case select to call different functions, those functions will probably have another Case Select statement and or an If Then Else. The tutorials I linked to happen to go over Functions, If Then Else Statements, and Select Case Statements. It will take a while to go through the Introduction to VBA series of tutorials. But, I believe they are relevant to what you are doing.

  2. #17
    ahoneycutt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    18
    Quote Originally Posted by June7 View Post
    I think you better go with a table and domain aggregate.
    Thanks June7 but can you explain a little more. I have the qry and obviously I can put it in a table. All the fields except for the one I am trying to calculate is already in a table. I am pulling the data from a table which is currently in rows by person but I have to evaluate the EB and Direct Control and many other fields which are now columns in my crosstab. I can dump this into a table but then what? I am still evaluating up to 3 columns of information for each person at the minimum.

    Thanks again. Sorry I don't understand where you are headed with this.

    Please explain more.

  3. #18
    ahoneycutt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    18
    Thanks ItsMe.

    I went through the tutorials you reference and I understand what it is doing I just don't understand how to apply it to this situation.

    The threshold's are already set in a table. They are in this query simply to use for the calculation because I am having to evaluate the Plan and the amount against the threshold. I appreciate your help but you might was well be speaking another language because I do not know how to do any of the things you are telling me. I don't know how to create a formula using variables. I am just out of my league. Was hoping to get help but the help is to hard to understand. Thanks for trying.

  4. #19
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by ahoneycutt View Post
    ...I went through the tutorials you reference and I understand ...
    I don't know how to create a formula using variables...
    Thanks for trying.
    As I mentioned, it will take a while to go through the tutorials.

  5. #20
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Post your db for analysis so we can get a better understanding of structure.

    Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #21
    IrogSinta is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    103
    Is the only thing different between the 17 bonus tiers, the Plan# and the field being compared to? In your sample of 2 plans, you have 3 possibilities with each plan and in each one you compare a certain field (i.e. EB & Direct Control) against other fields; however, it seems that your comparison expressions are similar. Will this be the case for all 17 plans?

    Ron

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

Similar Threads

  1. Too long of query, way to store statements?
    By btappan in forum Queries
    Replies: 3
    Last Post: 12-15-2013, 10:12 PM
  2. Switch Statement
    By comfygringo in forum Queries
    Replies: 4
    Last Post: 09-04-2013, 03:07 PM
  3. Option Button If-Then statements
    By dccjr in forum Programming
    Replies: 5
    Last Post: 01-07-2013, 08:06 PM
  4. Switch Statement in WHERE Clause
    By Gray in forum Queries
    Replies: 1
    Last Post: 06-02-2011, 06:50 AM
  5. Replies: 6
    Last Post: 04-06-2010, 03:00 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