【发布时间】:2016-01-22 15:37:26
【问题描述】:
我需要根据未绑定表单上的用户输入创建报告。
我有两个数据来自的表:
Table Name: RMAMaster
Fields:
RMANbr (5 digit number)
DateIssued (date in MM/DD/YYYY format)
CompanyName (text)
CustNbr (6 digit number)
Table Name: RMAItems
Fields (that are relevant for the search):
RMANbr (relationship established to RMAMaster.RMANbr)
PartNbr (text)
Warranty (Yes/No)
Disposition (lookup from another table)
表单(名称:RMA 报告搜索)上有以下控件,其想法是用户可以填写任意数量的字段。空白字段表示“搜索所有字段”,填写字段表示“搜索这些字段中的数据”。
CustNbr (being in the RMAMaster table)
PartNbr (being in the RMAItems table)
Date Opened <start> to <end> (being in the RMAMaster table)
Disposition (being in the RMAItems table)
Warranty (drop down with choice "Yes", "No" and "Any") (being in the RMAItems table)
(可以根据用户的需要添加更多字段)
例如,我输入部件号“G-5645”并将“保修”保留为“任何”,它将搜索具有部件号“G-5645”的所有 RMA 并将它们显示在报告中。报告的支付方式如下:
RMAMaster.RMANbr RMAMaster.DateIssued RMAMaster.CustNbr, RMAMaster.CompanyName
|
|-- RMAItems.PartNbr RMAItems.Warranty RMAItems.Disposition
|-- RMAItems.PartNbr RMAItems.Warranty RMAItems.Disposition
|-- (possibly repeated depending on how many items the customer sent back
我可以构建报告,但我并没有专注于从表单 RMA 报告搜索中获取数据并从中构建报告。我使用查询吗?调用报告的VBA代码?不知道我应该怎么做。任何帮助将不胜感激。
谢谢!
【问题讨论】: