In relational data base every table requires a primary key to uniquely identify each record in that table.
You have no primary keys defined.
Access does not like embedded spaces or special characters in field names.
Combo Code (Account) and Position # are bad examples of field names in Access.
What exactly do you think the query is doing? And why do you think the RIGHT join isn't working?
Here are a few counts that may mean something to you.
There are 1293 records in Actuals, but only 1239 unique position numbers.
There are 754 records in the Budgeted but only 751 unique position records.
I think this query gives you the Hours and Amounts for Positions and Cost Centers that are in Actuals but are not in the Budgeted, but I don't know your data.
Code:
SELECT [ActualHours&Salary(1 payperiod)].[Position Nbr]
, [ActualHours&Salary(1 payperiod)].Charge
, [BudgetHrs&Salary(Per Payperiod)].[Position #]
, [BudgetHrs&Salary(Per Payperiod)].[Combo Code (Account)]
, [ActualHours&Salary(1 payperiod)]![ActualHoursWorked] AS Varhrs
, [ActualHours&Salary(1 payperiod)]![ActualEarned] AS VARaMT
FROM [ActualHours&Salary(1 payperiod)] LEFT JOIN [BudgetHrs&Salary(Per Payperiod)]
ON ([ActualHours&Salary(1 payperiod)].Charge = [BudgetHrs&Salary(Per Payperiod)].[Combo Code (Account)])
AND
([ActualHours&Salary(1 payperiod)].[Position Nbr] = [BudgetHrs&Salary(Per Payperiod)].[Position #])
WHERE
((([BudgetHrs&Salary(Per Payperiod)].[Position #]) Is Null) AND
(([BudgetHrs&Salary(Per Payperiod)].[Combo Code (Account)]) Is Null));
Here are a few sample output records from that query. Run the query against your table to see all.
Code:
Position Nbr |
Charge |
Position # |
Combo Code (Account) |
Varhrs |
VARaMT |
00001064 |
25732 |
|
|
18.739995 |
1423.59 |
00001456 |
17232 |
|
|
53.582913 |
3786.04 |
00001594 |
21520 |
|
|
75 |
5504.86 |
00001602 |
21520 |
|
|
75 |
1900.88 |
00001846 |
14280 |
|
|
9.370004 |
579.04 |
00003112 |
25722 |
|
|
46.93 |
1123.71 |
00003133 |
14470 |
|
|
28.11006 |
1807.67 |
00003143 |
25733 |
|
|
37.439994 |
2854.38 |
00003154 |
25722 |
|
|
60 |
1444.43 |
00003811 |
16630 |
|
|
75 |
4492.54 |
00003813 |
16570 |
|
|
56.25 |
3547.65 |
I hope this is helpful to you.