Ms access - vba for between two values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joey64
    New Member
    • Mar 2022
    • 2

    Ms access - vba for between two values

    I have just started learning vba and I have script that is working except for the between two values and was wondering if anyone can tell me where I'm going wrong. If I'm not providing the correct information please let me know and I'll do my best but am a complete novice. Everything else works it's just when I get to the between choices. I've tried several different variants from what I have found on-line but still it is not working.

    The section in question is the Projected Total Spend Values between $30K and $150K

    ElseIf [ProcurementType Id].Value = "1" And [CategoryComplex ity].Value = "Leveraged" And [ProjectedTotalS pend].Value >= "30000" And [ProjectedTotalS pend].Value < "150000" Then
    [ProcurementProc ess].Value = "3 Direct Quotes"

    Any help would be greatly appreciated.
  • cactusdata
    Recognized Expert New Member
    • Aug 2007
    • 223

    #2
    Use numbers:

    Code:
    ElseIf [ProcurementTypeId].Value = 1 And [CategoryComplexity].Value = "Leveraged" And [ProjectedTotalSpend].Value >= 30000 And [ProjectedTotalSpend].Value < 150000 Then
        [ProcurementProcess].Value = "3 Direct Quotes"
    End If

    Comment

    Working...