Results 1 to 11 of 11
  1. #1
    KayTee is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    6

    Question Lookup list with a write-in option

    I am designing a new db that involves a couple of lookup lists. One of the options on my list is Other:.


    When Other: is selected, I need to be able to write-in the answer. How do I write that command?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Is this a multi-column combobox with hidden ID field and therefore displays alias description? What you want probably won't work with that.

    If not saving ID value then could set combobox LimitToList property to No and user can type in whatever they want.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    KayTee is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    6
    Yes, it is a multi-column list with hidden ID field. Not sure I understand your answer. Are you saying I can't use the hidden ID column? The source table is based on the hidden column (corresponding number).
    Attachment 16861Only the facility name appears on the form, but when Other is selected, need to be able to write in.....

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There is no ID in the lookup table for user 'write in' value - how do you expect an ID to be saved? Unless you want to allow user to add records to the lookup table 'on-the-fly' (and that gets a little complicated), free entry won't work with this.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    KayTee is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    6
    So can I add some kind of GoTo command when Other is selected that would bring up a separate field?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Could just have another textbox bound to a field for the additional descriptive input, no code required.

    Alternative is to save descriptive value instead of ID, something I do for very short descriptors.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    KayTee is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    6
    so sorry. I don't mean to be dense, but I don't understand what you mean by saving the descriptive value...does that mean adding another descriptor to my lookup table? Do you mean to save a new lookup? Lost in access - kayt

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I mean don't even have the ID in combobox RowSource, I mean save the alias descriptive text value from the lookup table. How many and what fields are in the lookup table?

    Post the combobox RowSource SQL statement.

    I tried downloading the attachment in your post and get error 'Invalid attachment'.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    KayTee is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    6

    SQL command

    Click image for larger version. 

Name:	Capture.JPG 
Views:	8 
Size:	55.7 KB 
ID:	16883 Click image for larger version. 

Name:	Capture Lookup.JPG 
Views:	8 
Size:	31.2 KB 
ID:	16881 Click image for larger version. 

Name:	facility name design view.JPG 
Views:	9 
Size:	94.3 KB 
ID:	16882
    So you are saying I need to separate the "Other" option out entirely, and write separate lookup command?

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    That may be one way of looking at it. If you want users to select Other and also provide specifics on what 'Other' really is, then create another field bound to textbox for input of that free-form info.

    Otherwise, get rid of the Other item and set up a procedure for users to add new Facility Name records to the lookup table 'on-the-fly' - that's what the NotInList event is for. Here is one example http://www.databasedev.co.uk/not_in_list.html


    Advise not to use spaces and special characters/punctuation (underscore is exception) in naming convention. Better would be ARIC_Num.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    KayTee is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    6
    Thank you soooo much! This is most helpful. I will try it out and see how it works....

    Thanks again,

    -kayt

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

Similar Threads

  1. Forms, Combox Edit List Option
    By RoundTrip in forum Access
    Replies: 7
    Last Post: 03-02-2014, 09:13 PM
  2. Replies: 8
    Last Post: 11-18-2013, 03:36 AM
  3. Replies: 9
    Last Post: 05-29-2012, 11:03 AM
  4. Replies: 8
    Last Post: 07-06-2011, 11:20 PM
  5. Replies: 1
    Last Post: 05-11-2011, 02:51 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