Solved FILTER FORM BY DATE TEXTBOX (1 Viewer)

georg0307

Registered User.
Local time
Today, 17:26
Joined
Sep 11, 2014
Messages
91
Dear All,

I'd like to simply filter the form clicking button, based on date in FilterData TextBox.

I cannot find correct VBA expression.
 

Attachments

  • FORDATE.zip
    4.6 MB · Views: 272

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:26
Joined
Feb 28, 2001
Messages
27,182
One way to do this is to apply a filter to the form via its .Filter property, then turn the filter ON and requery.


From the above link, you can see the .Filter and .FilterOn guidance.


The link includes a bullet item that expressly states that a Requery will take the Filter into account.
 

bob fitz

AWF VIP
Local time
Today, 16:26
Joined
May 23, 2011
Messages
4,724
Try:
Me.Filter = "[PREVISIONE_ARRIVO_ INTERPORTO] = #" & Format(Me.FilterData, "dd\/mm\/yyyy") & "#"
OR:
Me.Filter = "[PREVISIONE_ARRIVO_ INTERPORTO] = #" & Format(Me.FilterData, "yyyy\/mm\/dd") & "#"

Rather than:
Me.Filter = "[PREVISIONE_ARRIVO_ INTERPORTO] = #" & Format(Me.FilterData, "gg\/mm\/aaaa") & "#"
 

georg0307

Registered User.
Local time
Today, 17:26
Joined
Sep 11, 2014
Messages
91
Great Bob!!! It works sorry for my ignorance, your suggestion works. Have a nice Life!!!
 

bob fitz

AWF VIP
Local time
Today, 16:26
Joined
May 23, 2011
Messages
4,724
Great Bob!!! It works sorry for my ignorance, your suggestion works. Have a nice Life!!!
I'm glad it worked for you. Always pleased to help if I can.
Rest assured that you have No need to apologize for asking any question.
We all start knowing nothing and we all learn something along the way.
 

Users who are viewing this thread

Top Bottom