Subforms

P

Peter

Greetings all, a humble question...

Table one is related to table two, one to many. Table one is the main form
and table two the subform. One unique record in table one consistes of many
records in table two. I want to choose with a combox those "many
records"...and if i dont find them..i want to create one more to this unique
table one records...hm..yes
 
J

John W. Vinson

Greetings all, a humble question...

Table one is related to table two, one to many. Table one is the main form
and table two the subform. One unique record in table one consistes of many
records in table two. I want to choose with a combox those "many
records"...and if i dont find them..i want to create one more to this unique
table one records...hm..yes

Ummm...

There isn't really any question there.

If you just have a form with a subform, with the master and child link fields
set properly, that's just what you'll see. The subform will display all (if
there are any) existing child records, and there'll be a blank record where
you can add a new one.

Are you not seeing this?
 
P

Peter

Hi John...the subform is a "singel form" and i want to use a combobox to
choose the cildrecord...
 
J

John W. Vinson

Hi John...the subform is a "singel form" and i want to use a combobox to
choose the cildrecord...

I do not understand.

Is it a subform? or a separate single form?

What is its Recordsource?

Where is the combobox? What is it based on?
 
P

Peter

Hi John....appologize for not being clear from the beginning...most probably
because i am a confused beginner...:)

I have main form and two subforms in it. The Main and first Subform are
singleforms while the second subform is a continuous form. In the first
subform i want to be able to choose the masterfield that links to the
mainform...this way the second subform will will return value for this
choice...if the first subform was a datasheet i could simple focus on the
options that the aminform masterchld returns...but i canot because Access
does not a aloud me to reside a continouoius form on a continouius form...
 
J

John W. Vinson

Hi John....appologize for not being clear from the beginning...most probably
because i am a confused beginner...:)

I have main form and two subforms in it. The Main and first Subform are
singleforms while the second subform is a continuous form. In the first
subform i want to be able to choose the masterfield that links to the
mainform...this way the second subform will will return value for this
choice...if the first subform was a datasheet i could simple focus on the
options that the aminform masterchld returns...but i canot because Access
does not a aloud me to reside a continouoius form on a continouius form...

Put a textbox on the mainform; name it txtRelay. Set its Control Source to

=firstsubform.Form!controlname

using the name of your first subform and the control on that form which
contains the desired linking field.

Make the Master Link Field of the second subform

[txtRelay]

Do include the square brackets. This won't be one of the options that the
dropdown gives you but it will work.

Once you verify that txtRelay is getting the right value you can set its
Visible property to No.
 
P

Peter

Hi again John, just want you to know that it works very well indeed. Excactly
as you described, as a matter of fact this solution is far more
"ergonomically" correct...once again, thanks!

John W. Vinson said:
Hi John....appologize for not being clear from the beginning...most probably
because i am a confused beginner...:)

I have main form and two subforms in it. The Main and first Subform are
singleforms while the second subform is a continuous form. In the first
subform i want to be able to choose the masterfield that links to the
mainform...this way the second subform will will return value for this
choice...if the first subform was a datasheet i could simple focus on the
options that the aminform masterchld returns...but i canot because Access
does not a aloud me to reside a continouoius form on a continouius form...

Put a textbox on the mainform; name it txtRelay. Set its Control Source to

=firstsubform.Form!controlname

using the name of your first subform and the control on that form which
contains the desired linking field.

Make the Master Link Field of the second subform

[txtRelay]

Do include the square brackets. This won't be one of the options that the
dropdown gives you but it will work.

Once you verify that txtRelay is getting the right value you can set its
Visible property to No.
 

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