Passing Date From Form To Query (1 Viewer)

lhooker

Registered User.
Local time
Today, 18:12
Joined
Dec 30, 2005
Messages
405
Anybody see what is wrong with the content in my 'Testit' query criteria ? I'm trying to pass dates from a form (i.e. Date_Selected) to my query (i.e. By_Selected_Date_Query) ? The syntax used is below. Also, I've attached the database.

Between [Form]![Date_Selection]![StartDate] And [Form]![Date_Selection]![EndDate]
 

Attachments

  • Testit.accdb
    1.7 MB · Views: 50

June7

AWF VIP
Local time
Today, 14:12
Joined
Mar 9, 2014
Messages
5,492
Needs to be Forms - with an 's':

Between [Forms]![Date_Selection]![StartDate] And [Forms]![Date_Selection]![EndDate]
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 23:12
Joined
Jul 9, 2003
Messages
16,363
Your Between Statement should be:-

Code:
Between [Forms]![Date_Selection]![StartDate] And [Forms]![Date_Selection]![EndDate]
 
Last edited:

lhooker

Registered User.
Local time
Today, 18:12
Joined
Dec 30, 2005
Messages
405
June7/Uncle Gizmo,

That did it . . . Thanks ! ! !
 

niranjanprajapati23

New member
Local time
Tomorrow, 03:42
Joined
Oct 27, 2018
Messages
2
Can passing date with selection other field also...
(in account software sample )
begin date to end date
with
sales register bill paid days or unpaid due days (30 days or more then as user define)
 

June7

AWF VIP
Local time
Today, 14:12
Joined
Mar 9, 2014
Messages
5,492
I don't use dynamic parameterized queries. I prefer VBA to build filter criteria. Review http://allenbrowne.com/ser-62.html

Not quite sure what you are asking for now. If you need to determine which bills are unpaid and how long unpaid, that is invoice aging and rather complicated. Suggest you Google the topic.
 

Users who are viewing this thread

Top Bottom