Hi I have a form that a user enters various bits of data onto. , the data is then inserted into a table called 'TblInventory'. The code works fine accept that the field called D8Rec changes format from dd/mm/yyyy to mm/dd/yyyy once it's inserted into the table.
The code I'm using for the insert is:
I've tried using:
To correct the format but it doesn't work.
Can anyone point out what I'm doing wrong?
Thanks
The code I'm using for the insert is:
Code:
CurrentDb.Execute "INSERT INTO TblInventory (Location, IDNum, OrderID, Qty, DateRec) SELECT " & [Forms]![Inventory_Receive]![Location] & " AS Expr7, '" & [Forms]![Inventory_Receive]![D8Rec] & "-1' AS Expr2, " & [Forms]![Inventory_Receive]![idi] & " AS Expr3, 1 AS Expr4, #" & [Forms]![Inventory_Receive]![D8Rec] & "# AS Expr1"
I've tried using:
Code:
format([Forms]![Inventory_Receive]![D8Rec],"dd/mm/yyyy")
To correct the format but it doesn't work.
Can anyone point out what I'm doing wrong?
Thanks