Re: ADO.NET Rowfilter - between 2 dates



The following works fine for me:

mEmployeeAO.MainView.RowFilter = "EMP_Hiredate > #11/01/2006# AND
EMP_HireDate < #11/30/2006#"
As does:

Dim d1 As Date = #11/1/2006#

Dim d2 As Date = #11/30/2006#

mEmployeeAO.MainView.RowFilter = "EMP_Hiredate > #" & d1.Date.ToString &
"# AND EMP_HireDate < #" & d2.Date.ToString & "#"

HTH



<steffen.trommer@xxxxxxxxx> wrote in message
news:1164100695.233477.188990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear VB experts,

how can i set a rowfilter to a Dataview that filters the data from a
startdate to a enddate?

I tried this, but whithout success:

Me.CurDataViewStatistik.RowFilter = "DATEFIELD >= #" &
Format(Me.dtpVon.Value, "yyyy\/MM\/dd") & "# AND DATEFIELD <= #" &
Format(Me.dtpBis.Value, "yyyy\/MM\/dd") & "#"

The execution shows no errors, but the rowcount is 0.

Database is Access 2003 with .NET 2.0.

Thank you
Steffen



.



Relevant Pages

  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... I created a database exactly as you said, the only change I made was to ... upload it into the 'databases' folder, and not a folder called 'App_Data', ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: mailmerge and sql
    ... that is essentially a database application with a document ... the recordset to the Word Template and use it as if I got ... >> using an ADO recordset as a datasource (if it could be ... >Dim oCatalog As ADOX.Catalog ...
    (microsoft.public.word.mailmerge.fields)
  • Requery of Listbox does not display new data
    ... add a record to the database. ... Then the Lisbox control's requery method is ... The ADO command is run using a connection string to the mdb containing the ... Dim cmd As ADODB.Command ...
    (microsoft.public.access.formscoding)