本文介绍了在此访问查询中添加空白行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在此查询中添加空白行以显示子表单. (如果表单上没有数据,则该表单将不会显示.我需要显示该表单,因为它已计算出从子表单中获取的未显示占位符的字段可能为"0")
I need to add a blank row to this query in order to show a subform. (if no data on the form, the form wont show. I need it to show so because it has calculated fields taken from the subforms not showing place holder may be "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;
推荐答案
尝试如下操作:
select field1, field2, etc
from etc
union
select null field1, null field2, etc
from someSmallTable
这篇关于在此访问查询中添加空白行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!