D
doug
i am running a query in access 97 that runs on the click
event of a button. The code is a select sum of a field
for certain criteria...the sql line looks fine but when i
call the recordset i get an error. can anyone direct me
how to run a query like that in code. my current code
look something like this:
strSQL = "SELECT Sum(Time_Log_table.Time) AS Expr1 FROM
Time_Log_table WHERE ((Time_Log_table.[Task Date])= """ &
[Forms]![time_entry_form]![calendar].[Value] & """ AND
(Time_Log_table.[Assoc Number]=""" & [Forms]!
[time_entry_form]![txtAssocNumber].[Value] & """))"
Set rst = dbs.OpenRecordset(strSQL)
If Not rst.EOF And Not rst.BOF Then
txtDailyHours.Text = rst!expr1
End If
thanks for any help
event of a button. The code is a select sum of a field
for certain criteria...the sql line looks fine but when i
call the recordset i get an error. can anyone direct me
how to run a query like that in code. my current code
look something like this:
strSQL = "SELECT Sum(Time_Log_table.Time) AS Expr1 FROM
Time_Log_table WHERE ((Time_Log_table.[Task Date])= """ &
[Forms]![time_entry_form]![calendar].[Value] & """ AND
(Time_Log_table.[Assoc Number]=""" & [Forms]!
[time_entry_form]![txtAssocNumber].[Value] & """))"
Set rst = dbs.OpenRecordset(strSQL)
If Not rst.EOF And Not rst.BOF Then
txtDailyHours.Text = rst!expr1
End If
thanks for any help