AngelSpeaks
Well-known member
- Local time
- Today, 14:08
- Joined
- Oct 21, 2021
- Messages
- 693
Hi Everyone,
I have a database that has a Navigation form. One of the forms has date fields for StartDate and EndDate for date selection.
My query is using these dates for selection criteria with no problem. My problem is I want the StartDate and EndDate to display in the query results.
The criteria is set up as:
The SQL for this is:
The column to display is set up as:
The SQL version is:
The only time I get something to display in PayrollStart is when I execute the query outside of the Criteria form and I get prompted to enter the dates.
Thanks
Cathy
I have a database that has a Navigation form. One of the forms has date fields for StartDate and EndDate for date selection.
My query is using these dates for selection criteria with no problem. My problem is I want the StartDate and EndDate to display in the query results.
The criteria is set up as:
Between [Forms]![frmNavigation]![NavigationSubform].[Form]![StartDate] And [Forms]![frmNavigation]![NavigationSubform].[Form]![EndDate]
The SQL for this is:
HAVING (((tblPWBenefits.Date) Between [Forms]![frmNavigation]![NavigationSubform].[Form]![StartDate] And [Forms]![frmNavigation]![NavigationSubform].[Form]![EndDate]))
The column to display is set up as:
PayrollStart: [Forms]![frmNavigation]![NavigationSubform].[Form]![StartDate]
The SQL version is:
SELECT [Forms]![frmNavigation]![NavigationSubform].[Form]![StartDate] AS PayrollStart, [Forms]![frmNavigation]![NavigationSubform].[Form]![EndDate] AS PayrollEnd
The only time I get something to display in PayrollStart is when I execute the query outside of the Criteria form and I get prompted to enter the dates.
Thanks
Cathy