How to filter name type data?

Z

zSplash

I have a Names table that contains all the names of the database (with a
nameType for each name). The Names table is related to the Main table with
the Main table's pk related to the fk of the Names table. I want to myForm
to list each nameType (there are 12+), along with the firstname, lastname,
DOB, etc., in the following style (separate row per nameType):
NameType - first - last - DOB

I will use a label for the nameType (i.e., "originator") -- I don't want to
use a combobox for nameType because I want to have separate rows for each
nameType on my form. I will use bound-textboxes for my first, last, DOB
fields (bound to a Names query based on the Names table) .

I don't understand how to make my first, last, and DOB fields/textboxes
filter out for specific nameTypes (i.e., only nameType = "originator"). Or,
to say it another way, I want the first/last/DOB fields/bound-textboxes
empty unless a nameType = "originator" for the pk of the Main table exists.

TIA
 
Z

zSplash

For example, I try assigning this value for the Control Source for the bound
textbox:
=[Last] where [nameType]="originator"
and get "#Name?" error for the last name of the originator.

Where do I indicate I want only the lastname when the nameType is
"originator"?
 
Z

zSplash

IAC, if I create a subform of Names, I get precisely what I want, without
having to create labels or set properties for textboxes!

zSplash said:
For example, I try assigning this value for the Control Source for the
bound textbox:
=[Last] where [nameType]="originator"
and get "#Name?" error for the last name of the originator.

Where do I indicate I want only the lastname when the nameType is
"originator"?

zSplash said:
I have a Names table that contains all the names of the database (with a
nameType for each name). The Names table is related to the Main table
with the Main table's pk related to the fk of the Names table. I want to
myForm to list each nameType (there are 12+), along with the firstname,
lastname, DOB, etc., in the following style (separate row per nameType):
NameType - first - last - DOB

I will use a label for the nameType (i.e., "originator") -- I don't want
to use a combobox for nameType because I want to have separate rows for
each nameType on my form. I will use bound-textboxes for my first, last,
DOB fields (bound to a Names query based on the Names table) .

I don't understand how to make my first, last, and DOB fields/textboxes
filter out for specific nameTypes (i.e., only nameType = "originator").
Or, to say it another way, I want the first/last/DOB
fields/bound-textboxes empty unless a nameType = "originator" for the pk
of the Main table exists.

TIA
 

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