ID Filtering Problem with DoCmd.OpenForm

J

JB

I have a project with a complex series of nested forms that are
synchronized using the Where condition of DoCmd.OpenForm. I have a
standard form (not continuous records) called NetworkPrograms.
NetworkPrograms also contains a subform called StandardAirtime. The
StandardAirtime subform is not using a continuous layout. It shows only
the most recent airtime in the subform and the client can scroll
through the other records in the subform to view the past standard
airtimes.

The NetworkPrograms form has a command called ShowEpisodes. That
command opens a Continuous form called ShowEpisodes which lists all of
the episodes for a given program. ShowEpisodes also automatically opens
another Main form, called Airdates, that shows the related airdates of
the currently selected episode. ShowEpisodes and Airdates appear
simultaneously in a split screen layout. Each time an Episode is
selected in the ShowEpisodes form it uses a filter in the Current Event
to refresh the Airdates form to show the airdates for the selected
episode.

That's the background, here's the problem. When I select an episode in
the ShowEpisodes form, the filter in DoCmd.OpenForm is based on two
IDs:
the ID for the selected Episode, EpisodeID, and the ID for the current
selected StandardAirtime in the NetworkPrograms form,
StandardAirtimeID. The issue is that the current standard airtime may
not have been used with that episode. An Episode can also be aired
multiple times so in the database it may be associated with more than
one StandardAirtime.

In order to show an Airdate record in the Airdates form, I need both an
EpisodeID and a StandardAirtime ID. How can I determine which
StandardAirtime ID to get? Right now the current filter method is
creating incorrect results. I know I can solve the problem by reworking
the NetworkPrograms form and StandardAirtimes subform so that the
subform uses continuous records. The problem for that solution is it
will take me a lot of time to do that reworking and the client likes
the form the way it is. How else can I filter on an episode and then
figure out which StandardAirtimeID to use?
 
J

JB

I am adding on to this issue since I have been working on it throughout
the day. Changing the Subform StandardAirtimes into a Continuous form
made no improvement in the problem. The Where text of the
DoCmd.OpenForm command still contains the same information since the
filter is based on the current record of the subform. Now, I really
don't know what to try next!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top