home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,312 of 10,840   
   Svend Erik Johansen to All   
   Re: Date Error   
   16 Mar 05 13:18:12   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca