Forms and Subforms issues.

  • Thread starter Charles.Pierrot.II
  • Start date
C

Charles.Pierrot.II

Hello everyone!

I need some major assistance on a personal project. I've been stuck
on the whole subforms issue (not that I don't know how they work). In
any event, I've been creating a personal DVD collectoin database, and
have done fairly decent until now.

I have a main form that I want to use and display the same information
in two different ways. On the left side of the form, I want to use a
query (subform) to display a list of all the movies that I do own. I
on the right side of the form, I want to have another subform listed
to detail all the information of the selected movie on the left.
Furthermore, I want the information on the right to change according
to the selected movie on the left subform.

Any suggestions?

Please let me know if any more information is needed.

Thanks!

Charles
 
B

Bob Quintal

(e-mail address removed) wrote in
Hello everyone!

I need some major assistance on a personal project. I've been
stuck on the whole subforms issue (not that I don't know how
they work). In any event, I've been creating a personal DVD
collectoin database, and have done fairly decent until now.

I have a main form that I want to use and display the same
information in two different ways. On the left side of the
form, I want to use a query (subform) to display a list of all
the movies that I do own. I on the right side of the form, I
want to have another subform listed to detail all the
information of the selected movie on the left. Furthermore, I
want the information on the right to change according to the
selected movie on the left subform.

Any suggestions?

Please let me know if any more information is needed.

Thanks!

Charles
You should use a listbox, not a subform, on the left side of
your form. Then you set up the subform on the right side of the
form..The link parent field for the subform is the name of the
listbox.
 
J

John W. Vinson

Hello everyone!

I need some major assistance on a personal project. I've been stuck
on the whole subforms issue (not that I don't know how they work). In
any event, I've been creating a personal DVD collectoin database, and
have done fairly decent until now.

I have a main form that I want to use and display the same information
in two different ways. On the left side of the form, I want to use a
query (subform) to display a list of all the movies that I do own. I
on the right side of the form, I want to have another subform listed
to detail all the information of the selected movie on the left.
Furthermore, I want the information on the right to change according
to the selected movie on the left subform.

You can do this with the help of a "relay" textbox on the main form.

Set its Control Source to

=LeftSubformControl.Form!Controlname

using the name of your left subform (the Subform Control, not the name of the
form within that control), and use the name of a control on that form which
contains the unique DVD ID in place of Controlname.

Then set the Master Link Field property of the second subform to the name of
the textbox - you'll need to just type it in, the wizard won't offer it as a
choice.

You may need to Requery the textbox and/or the second form in the Current
event of the first subform.

John W. Vinson [MVP]
 
C

Chuck

You can do this with the help of a "relay" textbox on the main form.

Set its Control Source to

=LeftSubformControl.Form!Controlname

using the name of your left subform (the Subform Control, not the name of the
form within that control), and use the name of a control on that form which
contains the unique DVD ID in place of Controlname.



Ok, I'm on the right path as I had this part on my form too. It is
working up to that point without a problem, as I can scroll through
the list and populate the movie name to the other text box outside the
subform.

Then set the Master Link Field property of the second subform to the name of
the textbox - you'll need to just type it in, the wizard won't offer it as a
choice.

Here's where I get stuck. I know of this property that you're
referring to, but I don't have that option available. I"m not sure if
I setup my second subform correctly, as this already created form that
I have. Did I not set my form correctly? What can I change on my form
to get it to show these fields?
You may need to Requery the textbox and/or the second form in the Current
event of the first subform.

This part makes sense, once I can get the previous part working.
 
C

Chuck

Ok, I'm on the right path as I had this part on my form too. It is
working up to that point without a problem, as I can scroll through
the list and populate the movie name to the other text box outside the
subform.


Here's where I get stuck. I know of this property that you're
referring to, but I don't have that option available. I"m not sure if
I setup my second subform correctly, as this already created form that
I have. Did I not set my form correctly? What can I change on my form
to get it to show these fields?


This part makes sense, once I can get the previous part working.




- Show quoted text -- Hide quoted text -

- Show quoted text -


Update: I did find the Master Link without a problem. However, the
2nd form on the right is actually a form that I created to gather all
the information from the same table that the query in the subform on
the left pulls from (the form on the right isn't a query at all). I
still want to poplulate the rest of of the information based on the
supposed textbox that's mentioned earlier (which carries over the
actual title now).
 
J

John W. Vinson

Update: I did find the Master Link without a problem. However, the
2nd form on the right is actually a form that I created to gather all
the information from the same table that the query in the subform on
the left pulls from (the form on the right isn't a query at all). I
still want to poplulate the rest of of the information based on the
supposed textbox that's mentioned earlier (which carries over the
actual title now).

I have no idea what you're telling me here, Chuck.

Remember: you can see your form. I cannot.

What are the Recordsources of the two forms? Please post the SQL or the
fieldnames from the table.

What is the Control Source and name of the textbox?

What is the Master Link Field?

What result are you getting, or not getting that you want?

John W. Vinson [MVP]
 
C

Chuck

I have no idea what you're telling me here, Chuck.
Remember: you can see your form. I cannot.
What are the Recordsources of the two forms? Please post the SQL or the
fieldnames from the table.

For the Datasheet Form (the one that was going to list my movies), the
Record sources was "Movie Collection Query." The query pulled from
the table using the following SQL command:

SELECT [Movie Collection].OwnedDVDID, [Movie Collection].OwnedDVDTitle
FROM [Movie Collection]
WHERE ((([Movie Collection].VerifyOwned)=True))
ORDER BY [Movie Collection].OwnedDVDTitle;

For the Detailed Form (the one that will show the details of my
movies), the Record Source was "Movie Collection," which was the table
that holds my movie information.

For the sake of confusion, I didn't list all my tables here, as I have
about 10+ tables (some are joining tables for Screen formats, Actors,
etc) that all link to the main table, "Movie Collection."
What is the Control Source and name of the textbox?

The name of the textbox you suggested for me to make was called
"MovieLink."

The Control Source of the textbox originally was SQL code listed as
follows:

=Forms![Movie Owned Main Form]![Movie Collection Query subform].Form!
OwnedDVDTitle.

John, this code originally led to my previous post. However, I changed
it to the following after reading your questions:

=Forms![Movie Owned Main Form]![Movie Collection Query subform].Form!
OwnedDVDID

After changing it, everything worked.
What is the Master Link Field?

The Master Link Field (before and after my previous post) was
"MovieLink"
What result are you getting, or not getting that you want?

Before my previous post, My datasheet form worked, and the suggested
textbox - MovieLink - worked. The Detailed form was not populating
against the datasheet form; it was only pulling from my table "Movie
Collection."

After rereading your post and making the changes, everything worked as
you suggested. I just failed to link to my primary key.

John, thanks for your assistance, as it has helped me think through my
processes.
 
C

Chuck

(e-mail address removed) wrote in









You should use a listbox, not a subform, on the left side of
your form. Then you set up the subform on the right side of the
form..The link parent field for the subform is the name of the
listbox.

Bob, I tried this also and it worked. And actually, it has helped me
figure out my small error I had in John's suggestion. I just had to
make sure that I was using my primary key to make it work.

So in the end... I have two ways to display my information and I
learned something in the process.

Thanks Guys!
 

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