Navigation between forms

  • Thread starter Thread starter Christophe Schoofs
  • Start date Start date
C

Christophe Schoofs

I have a problem:

I've made a database of my dvd movies containing a form for every movie with
all information like name, year, actors, genre, etc..
I made also queries which list for example all movies from a certain year or
genre. These queries are only shown as a list of DVD titles, but now I'd
like to have a button next to each title which brings me, when clicked, to
the appropriate form (with all the information) of that particular DVD.
Is this possible in MS Access, and if yes, how? And is it also possible with
Data Access Pages, or only with forms?

Thanx alot,

Christophe
 
Look up: OpenForm method under DoCmd in Help
Look at the parameters.

Provided "frmMyForm" is the appropriate formname and
DVD_ID is the chosen DVD, the below statement is
likely to open the correct form, showing corresponding info.

DoCmd.OpenForm "frmMyForm", , , DVD_ID

To open up a form showing corresponding info, you might
also want to make use of the OpenForm wizard.

Krgrds,
Perry
 
Hmmmm, let's get a few things straight. You said you
have "a form for every movie." I hope not. What you should
have is a table with one record for each movie, with the
title of the movie likely the KEY value. The of course you
have other values like genre, actors, year, etc.

Okay, then it sounds like you have queries set up calling
records that match, say, a certain year or a certain
genre. What you want to do is have a way to view the
results of the query, but click from it to a form showing
all values for any record you're seeing, right?

I would just set up on big form that calls ALL the values
of ALL the records in your table. Let's call it Form.All.
So then say you're in a form that calls HORROR from 1995
or whatever. Go to design view, and insert a COMMAND
BUTTON. Follow the wizard and make that command button
launch a form. What form? Your Form.All. But make it call
that form where the KEY value TITLE of the record you're
currently viewing in the HORROR 1995 form = the KEY value
(title) of the table.

Make sense? I hope that helps. Or to simplfy, don't make
hundreds of different queries. Just use the All.Form as a
main way of viewing your DVDs. Any time you want to focus
in on certain years or genres, just search in form fields,
or set up a filter real quick. Good luck.
 
Thanx, that really helped me alot!
Using the OpenForm command solved my problem. This only works with forms
though; is there a similar method to do this using Data Access Pages? I
suppose it's not doable in html?
 
Hmmmm, let's get a few things straight. You said you
have "a form for every movie." I hope not. What you should
have is a table with one record for each movie, with the
title of the movie likely the KEY value. The of course you
have other values like genre, actors, year, etc.

Yep, my mistake, I have of course a table with 1 record for each movie.
Okay, then it sounds like you have queries set up calling
records that match, say, a certain year or a certain
genre. What you want to do is have a way to view the
results of the query, but click from it to a form showing
all values for any record you're seeing, right?
Right.

I would just set up on big form that calls ALL the values
of ALL the records in your table. Let's call it Form.All.
So then say you're in a form that calls HORROR from 1995
or whatever. Go to design view, and insert a COMMAND
BUTTON. Follow the wizard and make that command button
launch a form. What form? Your Form.All. But make it call
that form where the KEY value TITLE of the record you're
currently viewing in the HORROR 1995 form = the KEY value
(title) of the table.

Works great, thanx! Should have thought of that myself..
This works only with forms though, is there any way to do this with Data
Access Pages? I suppose there's no way to do this in html?
 
Back
Top