I have 3 tables, Table1 has OrgID, Table2 has BudID, Table3 has PayID. All are Primary Autonumbers.
I need to select some fields from table 2 and a sum of one field from Table3. Where OrgID in table2 = "selected id"
here is the code i use in vb. Total is a currency field, date is a date field others are ids.
Select b.BudID, b.Date, sum(p.Total) from Budgets b, Payments p where b.OrgID = " & strOrgID & " and b.BudID = p.BudID"
the error that i get is "You tried to execute a query that does not include the specified expression 'BudID' as part of an aggregate function"
Does anyone know what I can be doing wrong?
thanks in advance
omg i hope this made sense to someone
I need to select some fields from table 2 and a sum of one field from Table3. Where OrgID in table2 = "selected id"
here is the code i use in vb. Total is a currency field, date is a date field others are ids.
Select b.BudID, b.Date, sum(p.Total) from Budgets b, Payments p where b.OrgID = " & strOrgID & " and b.BudID = p.BudID"
the error that i get is "You tried to execute a query that does not include the specified expression 'BudID' as part of an aggregate function"
Does anyone know what I can be doing wrong?
thanks in advance
omg i hope this made sense to someone