syntax error (missing operator) in query expression (1 Viewer)

Benwatson

Registered User.
Local time
Today, 05:24
Joined
Oct 11, 2016
Messages
26
what it originally wanted this macro to do is to record the date the user put but for some reason it would record a completely different date in the table for some reason it was putting a date from 1899. so instead im trying to get it to put the system date at the time of adding the record

Run-time error '3075':

Syntax error (missing operator) in query expression '20/10/2016 03:41:07'

PHP:
CurrentDb.Execute "INSERT INTO Parcel([DATE],addedby,Discovering,deliveryno,ulidlocsubucc,description,ecas,qty,uom,reason,techid,lastname,firstname,shift)" & _
            " VALUES (" & Now & ",'" & Me.addedby & "','" & Me.Discovering & "','" & Me.Delivery & "','" & Me. _
            locloadsubucc & "','" & Me.Description & "','" & Me.ecas & "','" & Me.qty & "','" & Me.uom & "','" & Me. _
            type & "','" & Me.userid & "','" & Me.last & "','" & Me.first & "','" & Me.shift & "')"

please help im stuck
 

sneuberg

AWF VIP
Local time
Today, 05:24
Joined
Oct 17, 2014
Messages
3,506
Date/Time values need to be delimited by pound signs. Something like

...." VALUES (#" & Now & "#,'" .......

For more information read this.
 

Benwatson

Registered User.
Local time
Today, 05:24
Joined
Oct 11, 2016
Messages
26
Thank you MASSIVELY mate managed to make it work so that it records the users date input from that huge thanks
 

Users who are viewing this thread

Top Bottom