Thank you for taking the time to report an issue.
What's wrong... Please write below.
I have all that working. From here, I want to see if they have other certifications along with the one they opted for. So, I have a nested select statement in an OR clause to pull up theinformation in an IIF statement based on if the checkbox I made is checked or not checked.
I have this statement for my IIF Statement:
But several values require exactly the same formula, and rather than listing each of them out, I thought I could use Case Else to call this for the ones that did not meet the criteria.
When I do this, however, the value does not change. Here is my statement.
The Select Case statement is the multiway branching statement. If the probable actions based on the value of a variable are numerous, this statement is used. It is an easy way to send execution to different parts of the code depending on an expression.
Below I have an example. The strSQL variable in the transferspreadsheet statement is obviously incorrect, but just placed to show what I want.
I know I could do it by creating a table and then referring to that created table in the transferspreadsheet function, but would like avoid this if possible.
strSQL = "SELECT table1.SUBID from Table1 where table1.loc = somecriteria"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strSQL, filepathandname, True
Original iif statement that exists
I am trying to add another iif statement to the existing iif statement with the following methodology.
Iif original lock does not fall within the filter below, then change [ORIGINAL_LOCK] to [new_App_DT] otherwise leave as [ORIGINAL_LOCK]
This example will use the SQL statement to create an Access query, but you can use the statement in a macro or VBA as well.
I use it to calculate my commission percentage based on my current pay plan, which was recently changed. Here is my trusty old statement:
Attempting to keep the old information, and add one more criteria, I tried nesting a second If statement in, to look like this:
The problem is, the results that are returned, even for deals after June 1, are still showing the old calculation. How can I fix this?