Filtering Dates

  • Thread starter Thread starter jean
  • Start date Start date
J

jean

Hi

I have a continuous form bound on a table containing 600 records. On
this form I have a date field named "Text200" bounded on the table
field named "RecDate".

I want to be able to filter the form by double-clicking on the field
"Text200"

example one record show 10/11/2005 if I double-click that field form
will contain only records with 10/11/2005

I already have the script to do the same with a text field but it does
not work with a date field

Thanks for helping
 
Hi

I have a continuous form bound on a table containing 600 records.  On
this form I have a date field named "Text200" bounded on the table
field named "RecDate".

I want to be able to filter the form by double-clicking on the field
"Text200"

example one record show 10/11/2005  if I double-click that field form
will contain only records with 10/11/2005

I already have the script to do the same with a text field but it does
not work with a date field

Thanks for helping

Hard to say without knowing the script you use!

Do you use # as delimiter around the date?

Groeten,

Peter
http://access.xps350.com
 
Hi

I have a continuous form bound on a table containing 600 records.  On
this form I have a date field named "Text200" bounded on the table
field named "RecDate".

I want to be able to filter the form by double-clicking on the field
"Text200"

example one record show 10/11/2005  if I double-click that field form
will contain only records with 10/11/2005

I already have the script to do the same with a text field but it does
not work with a date field

Thanks for helping


You must explain how do you structure filtering...
If you have on QBE the reference to TextBox containing Data there is
some stranges...

If you use Filter method applied to Form you must remember that Data
required different Format.

If Data is extended format with also hh:mm:ss you can use:
Me.Filter="DateFieldName=" & Str(CDbl(Me!DateControlName))

If Field contain only dd/mm/yyyy you can use Long conversion:
Me.Filter="DateFieldName=" & CLng(Me!DateControlName)

This method is valid for all DB.

For JET only, you can use special Formatting chars #yourData#
Me.Filter="DateFieldName=#" & Me!DateControlName & "#"

@Alex
 
Back
Top