gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
I have a form where the user selects a date.
Code:
Private Sub ComboQuoteValidity01_AfterUpdate()
Select Case Me.ComboQuoteValidity01
Case "All Quotes"
Me.TextQuoteExpDate01 = "*"
Case "Only Valid Quote"
Me.TextQuoteExpDate01 = Date - 1
Case "Current and Expired within 30 Days"
Me.TextQuoteExpDate01 = Date - 29
Case "Current and Expired within 60 Days"
Me.TextQuoteExpDate01 = Date - 59
Case "Current and Expired within 90 Days"
Me.TextQuoteExpDate01 = Date - 89
Case "Current and Expired within 180 Days"
Me.TextQuoteExpDate01 = Date - 179
Case "Current and Expired within 360 Days"
Me.TextQuoteExpDate01 = Date - 359
Case Else
'
End Select
End Sub
[Code/]
I want to use that date in a query that is run after the user makes a selection
In the Criteria field, in the query, I entered >="#[Forms]![frmCostHistory]![TextQuoteExpDate01]#" (Also tried >=[Forms]![frmCostHistory]![TextQuoteExpDate01])
But this doesn't seem to work. the query results change when the forms date field is updated but the results are incorrect.
Example: If they enter todays date I am getting records where the dates are earlier than today.