Re: VB Insert SQL with Time Format Field

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,
if you TimeSlot has date/time type - then you can insert correct value in
following format: #mm/dd/yyyy hh:hh#

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"Meirav" <Meirav@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2FE182A0-72C2-4D6F-A851-F1CBF344EFD2@xxxxxxxxxxxxxxxx
> HELP :(
>
> tblTime
> > TimeID (Key)
> > TimeSlot (Time)
>
> I have a VB Module to insert TimeSlots. As a test I did the following:
> tmpTimeID = 2
> tmpTimeSlot = 1010 (defind as Integer)
>
> SQL Statement is:
> SQL1="INSERT INTO tblTime (TimeID, TimeSlot) VALUES (' " & tmpTimeID & " '
> ,
> ' " & tmpTimeSlot & " ' ) "
>
> It creates the record with the key of 2, but for TimeSlot field is EMPTY!
> I tried chaning the tmpTimeSlot to String (instead of Integer) and still
> nothing....
>
> Anyone? Help... Please....
>


.



Relevant Pages

  • RE: VB Insert SQL with Time Format Field
    ... Sorry for the tripple post... ... (have to be string HH:SS) ... > It creates the record with the key of 2, but for TimeSlot field is EMPTY! ...
    (microsoft.public.access.modulesdaovba)
  • VB Insert SQL Time format field Value
    ... I have a module to insert a record to tblTime (TimeID Key, TimeSlot Time) ... LoopTime is an Integer field and is calculated as 1010 (again for test ...
    (microsoft.public.access.modulesdaovba)
  • VB Insert SQL with Time Format Field
    ... > TimeID ... SQL Statement is: ... It creates the record with the key of 2, but for TimeSlot field is EMPTY! ...
    (microsoft.public.access.modulesdaovba)