Basic sub-form functionality

H

hfreedman

I have a main form called Master and a subform called Notes. I have set up
the one to many relationship between Master & Notes based on the common field
called WMS#. The Notes subform should only show the Notes records associated
with the current Master record. However, no matter which Master record is
current, the Notes sub-form displays ALL the Notes records, not just the ones
with matching WMS#'s. I created the sub-form by dragging & dropping the Notes
form onto the Master form which was in design mode. I had the wizzard icon
selected at the time although it didn't seem to do much. How can I correct
this? Please let me know. Thanks so much!
 
S

Steve Schapel

Hfreedman,

In design view of the Master form, have a look at the Properties of the
subform. You need to set its Link Master Fields and Link Child Fields
properties to the name of the linking field, which I assume would be
WMS# for both.

By the way, as an aside, it is not a good idea to use a # as part of the
name of a field or control.
 
W

Wayne-I-M

Hi

You could open the main form in design view - when you should be able to see
the main form and the sub form

Right click the subform subform (just at the edge) and open the properties
box. In the data column go to the link child/master rows and ensure that you
have WMS#. in both of the rows.

Note that you have have this data in both forms for it to work

Good luck with your project
 
J

joecosmides

First let's assume the following:

You have a Table called Mastertbl and a Table called Notestbl.
You also have a form called Masterfrm and another form called
Notesfrm. Obviously the Masterfrm goes to the Mastertbl and the
Notesfrm goes to the Notestbl.

Lets assume you have an autonumber field in your Mastertbl called
MasterID. You need to make sure you have a field in your Notestbl
called MasterID as well but the one in the Notestbl is not going to be
an autonumber but instead just a Number.

Then on your Mastertfrm you can use the toolbox and click on the
subform button and pick the Notesfrm form and put it onto your
Masterfrm. It will then ask you which 2 fields are linked. It should
automatically choose the MasterID fields from both tables. Click Next,
etc and then Finish.
 
H

hfreedman

Thanks to all of you. The solution worked and the tips were great. I've been
away from Access development and have forgotten a lot. Sorry and thanks again.

Howard
 

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