newbie form question

B

Boze

I have 2 tables

*tblItem (below is partial list of what it contains)
ItemID (pk)
ItemNum
ItemDescrip
GroupID (1 to many with tblGroup. An item may be part of more than one
Group)

*tblGroup
GroupID (pk)
GroupName

I used the form wizard to make form based on tblItem. I selected ALL the
items in the table to appear on the form.
My question; How do I get my form to show the Group NAME from tblGroup? At
this time, since the tables are linked via GroupID, what I see in the form
is the Group ID number. Makes sense but I don't know how to hide the ID and
show only the NAME

Thanks in advance for any help

Boze
 
G

Guest

The easiest way would be to create a query that would include both tables and
base your form on the query rather than the tables.
 
R

Rick Brandt

Boze said:
I have 2 tables

*tblItem (below is partial list of what it contains)
ItemID (pk)
ItemNum
ItemDescrip
GroupID (1 to many with tblGroup. An item may be part of more
than one Group)

*tblGroup
GroupID (pk)
GroupName

I used the form wizard to make form based on tblItem. I selected ALL
the items in the table to appear on the form.
My question; How do I get my form to show the Group NAME from
tblGroup? At this time, since the tables are linked via GroupID,
what I see in the form is the Group ID number. Makes sense but I
don't know how to hide the ID and show only the NAME

Thanks in advance for any help

In design view of the form delete the TextBox for GroupID. Then make sure
the Toolbox wizard is enabled (the magic wand toggle) and drop a new
ComboBox onto the form. Tell the wizard that you want to look up values in
a table and indicate tblGroup as the table to use. By default the wizard
will configure the ComboBox to have two columns. The first column will be
the bound column containing the GroupID which will be hidden and the second
column will be GroupName which is what it will display. Then tell the
wizard that you want to store the value for the ComboBox in the GroupID
field on your form.

When you are finished you will be able to use that ComboBox to enter
GroupIDs but what you *see* in the list of choices and after making the
selection will be the GroupName.
 
B

Boze

Rick, that worked perfectly! Thanks for such a clear, step-by-step,
explanation. Very easy to follow and I think I even follow the logic of the
method you used. What a bonus :)

Really appreciate the help.
Boze
 
B

Boze

Thanks Katuu. I'm new enough to Access that I haven't looked into queries
yet. Guess it's time to start. I'll use Ricks combo box solution for this
project but I can see knowing more about queries is probably essential.

Apprciate the suggestion
Boze
 

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