Automatically entering information into a form?

M

Matt Newton

Hi,

I think this will be fairly simple to do but I’ve not used
access for while so have forgotten quite a lot. I have a
table set up containing the following data. ID, Name,
Value and Supplier. At the moment i have it set up so that
if I enter my ID into the form then the name, value and
supplier appear for that item. Changing the ID changes the
information. What I want to so is hide the ID and setup a
combo box with the just the names. This is so the user is
then able to choose the name of product they want and then
the value and supplier are automatically entered into the
form. Any help would be appreciated. Thanks.
 
E

Eric Schittlipz

Matt Newton said:
Hi,

I think this will be fairly simple to do but I’ve not used
access for while so have forgotten quite a lot. I have a
table set up containing the following data. ID, Name,
Value and Supplier. At the moment i have it set up so that
if I enter my ID into the form then the name, value and
supplier appear for that item. Changing the ID changes the
information. What I want to so is hide the ID and setup a
combo box with the just the names. This is so the user is
then able to choose the name of product they want and then
the value and supplier are automatically entered into the
form. Any help would be appreciated. Thanks.


Step 1 is to adjust the Row Source of the combobox to get 2 columns ID and
Name sorted by Name. Then the next trick is to adjust the 'Column Count'
property to 2, but set the Column widths to something like 0cm;6cm (2 widths
split by a semi-colon). This, in effect, gives a hidden column which holds
the ID but displays the Name.
By the way, you should avoid naming fields "Name". Use "FirstName",
"LastName", "ContactName", "AnyName", but not just "Name" - it is a reserved
word.
 

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