Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Access form shows numeric value rather than text

Discussion in 'Information Technology' started by Accessidiot, Jul 28, 2006.

  1. Accessidiot

    Accessidiot
    Expand Collapse
    Guest

    Simple problem I'm Sure!
    I have a database where the user selects values from 4 fields (Manufacturer
    model etc) to create a user defined field, this works fine. The user should
    then be able to locate each of the user defined fields by a combo box (This
    combo has vehicle registration numbers in it).
    Unfortunately when the user defined fields are loaded into the form only the
    numeric value is shown (Manufacture model etc should be shown).
    I realise this is because access is only storing the reference to the
    original field. Question is how do I get it to display the Manufacturer,
    model etc rather than just the number?
    Thanks Ian
     
  2. Loading...


  3. Rod Plastow

    Rod Plastow
    Expand Collapse
    Guest

    Hi Ian,

    If I understand correctly you have one table with one or more foreign
    (numeric) keys that relate to other tables containing textual descriptions
    for Manufacturer, Model and so on. Your problem is that when you display the
    first table's data all you see are the foreign keys (numbers) and not the
    related textual data.

    I suggest you edit the properties of the affected fields on your form and
    find the property named Control Source. At present this will probably contain
    the name of the column of your first table (the bound table) that contains
    the foreign key (number). What you need to do is instruct Access to look up
    the text description associated with this number.

    I don't know your specification but what you need to enter as the Control
    Source is something along the lines of

    =DLookUp("Manufacturer_Description","Manufacturer_Table","Manufacturer_Id =
    " & [Manufacturer_Id])

    You need to substitute your own column and table names in the above.

    One final recommendation: while you are changing the fields' properties
    disable (Enabled = No) and lock (Locked = Yes) these fields to prevent the
    user changing them and to prevent the cursor pausing in these fields.

    Good luck.

    Rod

    "Accessidiot" wrote:

    > Simple problem I'm Sure!
    > I have a database where the user selects values from 4 fields (Manufacturer
    > model etc) to create a user defined field, this works fine. The user should
    > then be able to locate each of the user defined fields by a combo box (This
    > combo has vehicle registration numbers in it).
    > Unfortunately when the user defined fields are loaded into the form only the
    > numeric value is shown (Manufacture model etc should be shown).
    > I realise this is because access is only storing the reference to the
    > original field. Question is how do I get it to display the Manufacturer,
    > model etc rather than just the number?
    > Thanks Ian
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Wed, 7 Jun 2006 00:28:01 -0700, Accessidiot
    <Accessidiot@discussions.microsoft.com> wrote:

    >Unfortunately when the user defined fields are loaded into the form only the
    >numeric value is shown (Manufacture model etc should be shown).
    >I realise this is because access is only storing the reference to the
    >original field. Question is how do I get it to display the Manufacturer,
    >model etc rather than just the number?
    >Thanks Ian


    The simplest way is to display the information using a Combo Box
    rather than a textbox on the form. The combo should be bound to the
    numeric ID, but its first visible column should be the text. The combo
    box wizard on the toolbox will set this up for you by default.

    John W. Vinson[MVP]
     

Share This Page