Linking Data

  • Thread starter Thread starter Ljffusion1
  • Start date Start date
L

Ljffusion1

Hi I am biulding a production database. I made a table with the
following fields.

JobID
Description

JobID has codes like 10,20,30
with a description for each code in the description field.

What I need to know is when building my form should I use combo or
list boxes because I want it setup so that when I select a job code
the description appears in the box next to it.
I also need to know how to get it to do that.

Thanks
 
First of all, you shouldn't use 'Description' as a field name. It is a
reserved word in Access. Make it 'strDescription'.

A combo box will only display one field, only the drop down list shows
multiple columns. You may want to use an unbound combo box as a search
facility. When you select a job code from the list, the rest of your form
would show details relating to that job code. Is that what you want?
 
This sounds like a job for a combo box rather than a list box.

The RowSource should be a query based on the JoBID table, with JOBID as
column 1 and Description as column 2. Consider setting the combobox column
widths to 0;and whatever length you need for the description. This way, the
Description will appear in the combobox on your form and will not need a
second field next to it.
 
Ok I have my fields on the form like this

Job id Label then combo box then I have the desription combobox
and my table is named Production.

So do I remove the jobid box and leave the description box entering
the code you gave me?
 
Why not just display the description in the combo box?

Row Source: SELECT JobId, JobId & " - " & Description FROM tblJob ORDER BY
JobId
Bound Column = 1
Column Count = 2
Column Widths = 0;2
 

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

Back
Top