I am trying to make a history file that writes the username, machinename, date of entry and the task accomplished to the HISTORY table.
Unfortunately when I try to write the string (using AR for a variable) it will ask me to supply a value for AR.
I tested it with a MsgBox to make sure there wasn't a problem with the variable, and it is fine... so what must I do to use this variable in my INSERT INTO query?
-------Example of part of my code----------------
AR = "Added " & Str$(X) & " records to schedule."
MsgBox AR, vbCritical, AR
DoCmd.RunSQL "INSERT INTO HISTORY (UserName,MachineName,DateOfEntry,Task) VALUES (fOSUserName,fOSMachineName,Now(),AR) ;"
--------------------------------------------------
John Vogel
jvogel2000@hotmail.com
Unfortunately when I try to write the string (using AR for a variable) it will ask me to supply a value for AR.
I tested it with a MsgBox to make sure there wasn't a problem with the variable, and it is fine... so what must I do to use this variable in my INSERT INTO query?
-------Example of part of my code----------------
AR = "Added " & Str$(X) & " records to schedule."
MsgBox AR, vbCritical, AR
DoCmd.RunSQL "INSERT INTO HISTORY (UserName,MachineName,DateOfEntry,Task) VALUES (fOSUserName,fOSMachineName,Now(),AR) ;"
--------------------------------------------------
John Vogel
jvogel2000@hotmail.com