Masters, please help me with my DTPicker.. I want it to be saved in my db (access). But it always says: "Syntax Error in Insert Into Statement"
And this is my code:
Dim statement1 As String
Dim conn1 As ADODB.Connectio n
Set conn1 = New ADODB.Connectio n
conn1.Connectio nString = _
"Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & App.Path & "\DB.mdb"
conn1.Open
statement1 = "INSERT INTO tblDPSR (Date) VALUES (' " & Me.DTPicker1.va lue & " ' )"
conn1.Execute statement1, , adCmdText
..and my Date in Access is Date/Time
And this is my code:
Dim statement1 As String
Dim conn1 As ADODB.Connectio n
Set conn1 = New ADODB.Connectio n
conn1.Connectio nString = _
"Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & App.Path & "\DB.mdb"
conn1.Open
statement1 = "INSERT INTO tblDPSR (Date) VALUES (' " & Me.DTPicker1.va lue & " ' )"
conn1.Execute statement1, , adCmdText
..and my Date in Access is Date/Time
Comment