Hey Guys,
I have included a insert to statement. I am having issues with two of the variables. UpdateYear and UpdateMonthIndex. These two are just number variables, but I cannot figure out how to get the sql statement to realize they are numbers. I have no issue with the string variables.
SQLstr = "INSERT INTO [ProjectUpdate] ([ProjectNumber],[UpdateMonthIndex], [UpdateYear], [UpdateDate], [UpdateBy], [MonthlyUpdate])" & _
" SELECT '" & Me.ProjectNumber & "' AS ProjectNumber, " & _
Me.UpdateMonthIndex & " AS UpdateMonth, " & _
Me.UpdateYear & " AS Year, #" & _
Me.UpdateDate & "# AS Date, '" & _
Me.UpdateBy & "' AS Who, '" & _
Me.MonthlyUpdate & "' AS Monthly;"
I have included a insert to statement. I am having issues with two of the variables. UpdateYear and UpdateMonthIndex. These two are just number variables, but I cannot figure out how to get the sql statement to realize they are numbers. I have no issue with the string variables.
SQLstr = "INSERT INTO [ProjectUpdate] ([ProjectNumber],[UpdateMonthIndex], [UpdateYear], [UpdateDate], [UpdateBy], [MonthlyUpdate])" & _
" SELECT '" & Me.ProjectNumber & "' AS ProjectNumber, " & _
Me.UpdateMonthIndex & " AS UpdateMonth, " & _
Me.UpdateYear & " AS Year, #" & _
Me.UpdateDate & "# AS Date, '" & _
Me.UpdateBy & "' AS Who, '" & _
Me.MonthlyUpdate & "' AS Monthly;"