I have a form which displays the name of the Holiday and I wish to use that name to update a field in another field in another table. However the way that I have written my code it errors out on the fact that there are spaces in the name of the Holiday, such as "Washingons Birthday" or "Fourth of July". It would not be a problem if it stripped out the spaces and inserted the name without the spaces but I am not sure of the function to call to do that. I am using Access 2007 in an ADP format and this is only part of the query. I have been able to get it functional to this point.
Where it is failing is when I reference Left([Forms]![Holiday]![Ho
strSQL = " Update AdjustedSchedule"
strSQL = strSQL & " Set AdjustedSchedule.HOLADJUST =" & [Forms]![HOLIDAY]![DOW] & ","
strSQL = strSQL & " AdjustedSchedule.HOLIDAY =" & Left([Forms]![HOLIDAY]![HOLIDAY], 25) & ","
strSQL = strSQL & " AdjustedSchedule.STATUS = 'Holiday';"