Results 1 to 5 of 5
  1. #1
    mastromb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Plymouth, MN
    Posts
    37

    Lookup from Textbox

    So if you don't use Lookups in your tables how do you display the field you want instead of the PK.



    The situation I have is as follows:

    tblStates
    StateID
    StateAbbreviation
    StateName

    When I insert the StateID into my form fields as a text box I only get the primary key number. I know I can switch the form fields to combo boxes but in some instances I only want the field visible and not editable so I have set enabled to no and don't want to show the drop down list arrow.

    Thanks for the help.

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    There is a common statement that you do not use lookups in tables.

    This is a true but a bit misleading.

    The statement should be, " Only use lookups in Forms "

    Does this help.

  3. #3
    mastromb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Plymouth, MN
    Posts
    37
    Well, after my scolding the other day I learned my lesson about Lookups in tables. j/k

    No what I am trying to figure out is how do you accomplish a Lookup in a text box in a form to display the StateAbbreviation or StateName depending on what I want to have displayed

  4. #4
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    To be a little naughty, create a lookup in the table. Then add it to the form, then go back to the table and revert back to a text box.

    I think there is also a wizard that you can use to add a combo box. There is in 2003 but I do not know about 2007

  5. #5
    mastromb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Plymouth, MN
    Posts
    37
    Well I know how to turn the field in the form to a Combo Box and set the properties the display the right field that I want so I would be fine changing the field in the form to a Combo Box instead of a Text Box if I could turn off the arrow for the drop down list.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-26-2009, 01:09 PM
  2. change() on the textbox
    By skywalker in forum Forms
    Replies: 0
    Last Post: 03-01-2009, 01:28 AM
  3. total in textbox
    By micfly in forum Access
    Replies: 3
    Last Post: 11-09-2008, 11:24 AM
  4. Textbox will not allow input
    By cwf in forum Forms
    Replies: 0
    Last Post: 04-04-2008, 04:08 PM
  5. dynamic textbox
    By vam in forum Programming
    Replies: 1
    Last Post: 06-04-2006, 08:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums