Filtering Dates

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
 
X

XPS350

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
 
@

@Alex

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top