我需要从未绑定表单上的用户输入创建报表。访问通过表单输入创建报表
我有两个表,其中的数据将来自于:
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代码?不知道我该如何去做这件事。任何帮助,将不胜感激。
谢谢!
因此,查询本报告....我只是让它选择报告的字段,我需要显示没有任何WHERE语句?那么使用'DoCmd.OpenForm'或'DoCmd.OpenReport'? – Jguy
没错。报告本身不会有任何内置过滤器/声明。 where语句将根据搜索表单动态构建。 – RyanL