我需要在此查询中添加一个空行以显示子表单。 (如果表单上没有数据,表单就不会显示。我需要它才能显示,因为它计算的字段取自子表单而不显示占位符可能是" 0")
SELECT Expense.Expense_Date, Expense.Expense_Type, Expense.Truck_Lic_No, Expense.Supplier, Expense.Invoice_No, Expense.Description, Expense.Amount[Driver Truck Link Query].TDesc
FROM [Driver Truck Link Query] LEFT JOIN Expense ON [Driver Truck Link Query].Truck_Lic_No = Expense.Truck_Lic_No
WHERE (((Expense.Expense_Date) Between Forms!EnterForm!Begin_Date And Forms!EnterForm!End_Date) And ((Expense.Truck_Lic_No)=Forms!EnterForm!T_Licence))
ORDER BY Expense.Expense_Type;
答案 0 :(得分:0)
尝试这样的事情:
select field1, field2, etc
from etc
union
select null field1, null field2, etc
from someSmallTable