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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My date is being saved as a Time 1

Status
Not open for further replies.

ckeener

Programmer
Dec 2, 2003
53
US
I probably have a dumb mistake that I just can't see, but whenever I try to update a date field in my table, it changes it to a time. For example, this code

Code:
'If there is an ApprovedDate in txtApprDate1, then insert 
'it into the ApprovedDate field in tblLogs
        If Not IsNull(Me.txtApprDate1) Then
            If IsDate(Me.txtApprDate1) Then
                strSQL = "UPDATE tblLogs SET ApprovedDate = " & Me.txtApprDate1 & _
                    " WHERE LogRef = " & TempRef
            Else
                MsgBox "Please enter a Valid Approved date 1", vbExclamation
            End If
            db.Execute strSQL
        End If

This changes 9/30/1992 to 12:00:13 AM

What am I doing wrong?????

Thanks CalebK
 
Try this strsql

strsql = "UPDATE tblLogs SET ApprovedDate = #" & Me.txtApprDate1 & "# WHERE LogRef = " & TempRef

Tiny

Perfection is Everything
If it worked first time we wont be here!
 
Thanks Tiny,

That is exactly what I needed! Thank you for your response!

Caleb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top