From: crsoft@mail.dk   
      
   ... ups... theres a " too much   
   this is how: fldDate = cvdate('" & dtpDate & "')   
      
   Sorry   
   Svend   
      
   "Svend Erik Johansen" skrev i en meddelelse   
   news:42382062$0$304$edfadb0f@dread12.news.tele.dk...   
   > Hi   
   >   
   > Try: fldDate = cvdate('" & dtpDate & "'")   
   > instead   
   >   
   > Svend   
   > DK   
   >   
   >   
   > skrev i en meddelelse   
   > news:1110960446.350093.325760@g14g2000cwa.googlegroups.com...   
   > > Hello:   
   > >   
   > > I have an access database that stores employee timings by date.   
   > > At the same time, I have a form that queries this database.   
   > > On the form I use a DTpicker to enable a user input the date for which   
   > > he/she wants data   
   > > When I execute the query below in my VB code, I get a run time error   
   > > that says   
   > >   
   > >   
   > > Error ===> "Datatype mismatch in criteria expression."   
   > > Query ===> cmdQuery.CommandText = "SELECT * from tblTimings WHERE   
   > > fldDate = '" & dtpDate.Value & "'"   
   > >   
   > >   
   > >   
   > > I don't understand why I get this error when   
   > > both, the field fldDate is of type Date/time and dtpDate.Value returns   
   > > the same. I tried setting both the DB date and the control date to   
   > > different date formats such as short date, long/general date, custom   
   > > date, but I still get the same error.   
   > >   
   > >   
   > > Appreciate any help on resolving this   
   > >   
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|