Advanced Report Selector

padlocked17

Registered User.
Local time
Today, 16:28
Joined
Aug 29, 2007
Messages
275
All -

I have a Report Selector form that's laid out with a Drop-Down Combo Box that selects that name of a report and is populated by a table called tblReports.

I have two listbox's on the same page and two text fields that are used to filter by date.

The two listbox's rowsource is based on the selection made in Drop-Down Combo box. The tblReports table contains the report name, the actual name of the report in Access, RowSource for both Listbox's and an Yes/No field for whether or not the Date range can be used to filter.

I need to figure out how to filter a report based on varying rowsources in each list box. Each report is setup to be filtered a specific way, I'm just not sure how to get the selections in the listbox's to each report without using a lot of VBA that isn't dynamic in nature.

Any ideas how to create a report selector/filter when the report name is changed AND the listbox's with different criteria are changed as well?

Could use ANY help!
 
you still need the vba

i tend to save date ranges in global variables

public dateranges(2) as date

you have to reference them with a function

function readdaterange(x as long) as date
readdaterange = nz(dateranges(x),0)
end function

then in a query you can put, for any date

between readdaterange(1) and readdaterange(2)

if you want all, set another flag, or set the dateranges to date(0) and date ("31/12/9999")

you will still need to change all your queries to work with this, but its a one time only job

you can also read and retrieve these variables in captions in your reports
 

Users who are viewing this thread

Back
Top Bottom