Two unbound combos plus subform

G

google3luo359

Hello,

I have one unbound control on a parent form currently, that controls
what records are pulled up on its linked subform.
The Child/Master link is by StudNum.

I would like to add a second control to the parent form that will also
pull up records on the subform.
The first control is by searches by StudNum.
I'd like the second control to search by LastName&", "&FirstName.

I'm not sure how to set up this second control on the parent form.

TIA Ric
 
S

strive4peace

Hi Ric,

On the properties of the combo to search by name:

Name --> StudNum2

RowSource -->

SELECT
StudNum,
Lastname & ", " & Firstname as Student
FROM Students
ORDER BY Lastname, Firstname;

ColumnCount --> 2
ColumnWidths --> 0;1.5
ListWidth --> 1.5
ListRows --> 24

After Update event -->
me.StudNum_controlname = me.StudNum2

where StudNum_controlname is the name of the control on the
parent form containing StudNum for LinkMasterFields


Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 
G

google3luo359

Hi Crystal,

Thank you very much for your help!
It worked perfectly. :)

So this is the best way to have two combo controls on a parent form
controlling records in a subform?
I was trying to avoid creating a second subform, just to house this
second combo control.
Because I knew I'd have to also set up a parent/child relationship with
the second subform.
It seemed like an awful amount of extra clutter.

Ric
 
S

strive4peace

you're welcome, Ric ;)

Since the first combo is already set for LinkMasterFields,
this is a good way, and the best I can think of right now.

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 

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