G
Guest
I need help - I have been pulling my hair out over this
for days. We have recently upgraded our systems to windows
XP from 2000 and now the following VBA code does not work.
strSQL = "SELECT sales_invoice.invoice_id,invoice_no
AS 'Invoice
No',invoice_date AS 'Invoice
Date',sales_invoice.description AS
Description,company_name AS Client,timesheet.sell_currency
AS Cur ,SUM
(sell_net_total + sell_net_var) AS Net, SUM
(sell_tax+sell_tax_var) AS
Tax FROM sales_invoice,company,timesheet WHERE
sales_invoice.invoice_id=timesheet.sales_invoice AND
sales_invoice.company_id=company.company_id AND
sales_invoice.csv_sent IS NULL AND EXISTS(SELECT * FROM
timesheet t
WHERE t.sales_invoice=sales_invoice.invoice_id) and
company.self_billing=0 AND division_id = " &
cboDivision.value & "
AND sales_invoice.create_user=user_name() GROUP BY
sales_invoice.invoice_id,invoice_no ,invoice_date ,sales_in
voice.descr
iption ,company_name,timesheet.sell_currency "
lstSelection.RowSource = strSQL
1stSelection is a listbox. In XP the code returns the
values except for the SUM values where it returns zero -
strange!!!!!! Does anyone have any ideas why this is the
case.
thanks in advance,
nolz.
for days. We have recently upgraded our systems to windows
XP from 2000 and now the following VBA code does not work.
strSQL = "SELECT sales_invoice.invoice_id,invoice_no
AS 'Invoice
No',invoice_date AS 'Invoice
Date',sales_invoice.description AS
Description,company_name AS Client,timesheet.sell_currency
AS Cur ,SUM
(sell_net_total + sell_net_var) AS Net, SUM
(sell_tax+sell_tax_var) AS
Tax FROM sales_invoice,company,timesheet WHERE
sales_invoice.invoice_id=timesheet.sales_invoice AND
sales_invoice.company_id=company.company_id AND
sales_invoice.csv_sent IS NULL AND EXISTS(SELECT * FROM
timesheet t
WHERE t.sales_invoice=sales_invoice.invoice_id) and
company.self_billing=0 AND division_id = " &
cboDivision.value & "
AND sales_invoice.create_user=user_name() GROUP BY
sales_invoice.invoice_id,invoice_no ,invoice_date ,sales_in
voice.descr
iption ,company_name,timesheet.sell_currency "
lstSelection.RowSource = strSQL
1stSelection is a listbox. In XP the code returns the
values except for the SUM values where it returns zero -
strange!!!!!! Does anyone have any ideas why this is the
case.
thanks in advance,
nolz.