I am new to Access VBA programming. I am trying to build a code that reads the value in one of my form's text box and update a table (which has only one row of data/recordset). I tried various ways but I am getting error (I have attached the screenshot below). I have attached below the code I am using. I am using Access 2003. Please help.
Kindly let me know if you have any questions/concerns.
Thank you so much.
Private Sub CmdSetValues_Click()
Dim AsOfDate As Date
Dim strSQL As String
AsOfDate = Me.txtAsOfDate
strSQL = "UPDATE tblAsOfDate SET tblAsOfDate.[As of Date] = #" & AsOfDate & "#"