Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date insertation Problem 1

Status
Not open for further replies.

n1a2v3i3n

Programmer
Jan 19, 2009
18
Hi,

I am trying to input date to database using combobox. as follows

dim d as date
dim da as date

da = c1 & "/" & c2 & "/" & c3
d = Format(CDate(da), "dd/mm/yy")

With Adodc1
.AddNew
MsgBox " Date " & d
!daterem = Format(CDate(da), "dd/mm/yy")
MsgBox "Date Entered is " & !daterem
!vechno = txtvecno
!ecmserial = txtecmsno
!ECMpart = txtecmpno
!fault = txtflt
!Condition = Comcon

.Update
.Requery
End With

Here for example I input 26/1/2009 through combo box.
When this i moved to database it gets becomes 1/9/2026.

Could any one please tell me wht is the error and how to solve it
 
Which database engine ?
What are c1, c2 and c3 ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Engine is Microsoft.Jet.OLEDB.4.0.
C1, C2 and C3 as combobox
 
You may try this:
!daterem = CDate(da)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top