J
Jay
Is it possible to assign an SQL statement string to a TextBox's controlsource
property as in the example below? And if so, what is wrong with the syntax
(I get a "Run-time error '7956': The syntax in the subquery in this
expression is incorrect.")
JobID = 1
sSQL = "=SELECT Sum([Hours]*[HourlyRate]) " & _
"FROM Job_TimeCard " & _
"GROUP BY Job_TimeCard.JobID, Job_TimeCard.Billable " & _
"HAVING (((Job_TimeCard.JobID)=" & [JobID] & ") " & _
"AND (Job_TimeCard.Billable)=True))"
Forms!Job_Log.Text186.ControlSource = sSQL
property as in the example below? And if so, what is wrong with the syntax
(I get a "Run-time error '7956': The syntax in the subquery in this
expression is incorrect.")
JobID = 1
sSQL = "=SELECT Sum([Hours]*[HourlyRate]) " & _
"FROM Job_TimeCard " & _
"GROUP BY Job_TimeCard.JobID, Job_TimeCard.Billable " & _
"HAVING (((Job_TimeCard.JobID)=" & [JobID] & ") " & _
"AND (Job_TimeCard.Billable)=True))"
Forms!Job_Log.Text186.ControlSource = sSQL