Automatically entering information into a form?

  • Thread starter Thread starter Matt Newton
  • Start date Start date
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.
 
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.
 
Back
Top