Hi all,
Very strange going on with calendar control 12.0.
I'm using it to append deadlines to a table.
When the date is selected and cmd button pressed, it write a row of text including Me.Cal1 (my controls name).
The code below is my SQL which I run through VBA.
I have added a line of VBA to confirm the correct date – MsgBox Me.Cal1
When I run the code, the message box shows the correct date that has been selected – Say 8th March 2013 BUT when the query write to the table the date it inserts is 30th December 1899.
Has anyone come across this before?
INSERT INTO tbl_REF_Schedule ( REF, Type, PIC, UN, [Month], Date1 )
SELECT Format(Now(),'yyyymm') & '-' & Format(Now(),'dd') & [Type] & ' ' & [PIC] AS REF, tbl_REF_ReportPIC.Type, tbl_REF_ReportPIC.PIC, tbl_REF_ReportPIC.UN, Format(Now(),'yyyymm') AS Mth, " & Me.Cal1 & " AS DueDate
FROM tbl_REF_ReportPIC
WHERE (((tbl_REF_ReportPIC.Type)='1234'))
Many thanks
Very strange going on with calendar control 12.0.
I'm using it to append deadlines to a table.
When the date is selected and cmd button pressed, it write a row of text including Me.Cal1 (my controls name).
The code below is my SQL which I run through VBA.
I have added a line of VBA to confirm the correct date – MsgBox Me.Cal1
When I run the code, the message box shows the correct date that has been selected – Say 8th March 2013 BUT when the query write to the table the date it inserts is 30th December 1899.
Has anyone come across this before?
INSERT INTO tbl_REF_Schedule ( REF, Type, PIC, UN, [Month], Date1 )
SELECT Format(Now(),'yyyymm') & '-' & Format(Now(),'dd') & [Type] & ' ' & [PIC] AS REF, tbl_REF_ReportPIC.Type, tbl_REF_ReportPIC.PIC, tbl_REF_ReportPIC.UN, Format(Now(),'yyyymm') AS Mth, " & Me.Cal1 & " AS DueDate
FROM tbl_REF_ReportPIC
WHERE (((tbl_REF_ReportPIC.Type)='1234'))
Many thanks