Hi,
I have been trying to run a fairly straightforward but of VBA code to append four fields from a form into a table. Unfortunately, when the code runs through I get the 'Enter Parameter Value' box appear for the updatedby and changereason updates. This is very frustrating, but I am probably missing something simple. Code is below.
Any help with this would be great.
Cheers
Paul
date1 = Date
updatedby = fOSUserName
Change = Me.MIRef
changereason = InputBox("Please confirm reason for change to revised date")
DoCmd.RunSQL "INSERT INTO Tbl_RevisedEndDateChange ( [Updated By], Change, [Date Changed], [Reason for change] ) " & _
"Select " & updatedby & ", " & Change & ", " & Format(date1, "dd/mm/yyyy") & ", " & changereason & ";"
I have been trying to run a fairly straightforward but of VBA code to append four fields from a form into a table. Unfortunately, when the code runs through I get the 'Enter Parameter Value' box appear for the updatedby and changereason updates. This is very frustrating, but I am probably missing something simple. Code is below.
Any help with this would be great.
Cheers
Paul
date1 = Date
updatedby = fOSUserName
Change = Me.MIRef
changereason = InputBox("Please confirm reason for change to revised date")
DoCmd.RunSQL "INSERT INTO Tbl_RevisedEndDateChange ( [Updated By], Change, [Date Changed], [Reason for change] ) " & _
"Select " & updatedby & ", " & Change & ", " & Format(date1, "dd/mm/yyyy") & ", " & changereason & ";"