Tuesday, October 6, 2009

Microsoft Access Reports?

Yes, another Access question..



What is the VB coding to create a report based on selections of a series of dropdown boxes? Microsoft Office 2007 does have options like this, but I found if I select an option in the dropdown, it overwrites something each time.. this I cannot have.



Anyone know of the code to do this? I know this is possible, I did it once, I just can't remember the damn code..



Microsoft Access Reports?hp



Use a String variable (e.g. criteria) to build the equivalent of a Where clause (without the word Where) from your Combo Boxes, then . . .



DoCmd.OpenReport ReportName, acViewPreview,, criteria



If using a filter, its name would go between the adjacent commas in the above example.



No comments:

Post a Comment