Experts, I am using the below code to update a table. I need to adjust it. The issue is fldDate is being updated with the value of [Date] but I need it to update to the current date
. I have a field named [Date] and that is the issue. The “VALUES (#" & Format(Date, "m\/d\/yyyy") ” part in the code below would need to be adjusted to insert the current date (not the date found in the field [Date]). I know that [Date] is not ideal name but I am importing from excel. I do not want to change the name. thank you....
Private Sub cboStatus2_AfterUpdate()
Dim strSQL As String
strSQL = "INSERT INTO tblStatusHistory (fldDate, id, Buy_CP, Batch, TP_No, Status2) VALUES (#" & Format(Date, "m\/d\/yyyy") & "#," & Me!ID & ",'" & Me!Buy_CP & "','" & Me!Batch & "','" & Me!Trade_No & "','" & Me!cboStatus2.Column(1) & "')"