Results 1 to 5 of 5
  1. #1
    bbelly is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19

    Attach search selection to other data locations in a form

    I'm trying to migrate from Excel to Access (2016). My library list has exceeded 15,000 records, and Excel doesn't seem right for it.

    I have a 'search while typing' combo box / text box setup. (http://www.opengatesw.net/ms-access-...pe-Access.html). I couldn't figure out how to change fields within it, so I changed my field titles from TITLE to FIRST (name) & YEAR to LAST (name).

    So now, when I search and select from that, I need the rest of the form to reflect the relevant data, such as LENGTH, AUTHOR, LANGUAGE, etc.

    Would appreciate a point in the right direction.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    You changed your field names to match the code???? That was a big mistake. Did you also change your table names to match the code? Finding the names in code is really simple. You must have found them to even know what to change yours to.

    If you are using the code in the article, what happens - error message, wrong results, nothing? If the form is bound to table with the data, then it should display data.

    Hope fields are not named FIRST and LAST - these are reserved words. Also, advise no spaces or punctuation/special characters (underscore only exception). Better would be First_Name or FirstName.
    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
    bbelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19
    >
    Quote Originally Posted by June7 View Post
    You changed your field names to match the code???? That was a big mistake. Did you also change your table names to match the code?
    > Finding the names in code is really simple. You must have found them to even know what to change yours to.

    I could not (initially) find any reference to FIRST or LAST in the code. I have since found another window of code that does have reference to FIRST and LAST. I can make that a bit better now.

    > If you are using the code in the article, what happens - error message, wrong results, nothing?
    > If the form is bound to table with the data, then it should display data.

    The search function returns the answer I expect. What I would like to do is have the rest of the fields be populated with the data belonging to the selected record. (I simply pasted my database in place of the original table - and that generated the correct additional fields for my more extensive data.)

    > Hope fields are not named FIRST and LAST - these are reserved words. Also, advise no spaces or punctuation/special characters (underscore only exception).
    > Better would be First_Name or FirstName.
    The names were in the original sample. I am familiar with the naming conventions (I think error traps catch bad ones¿)

    Thanks for taking the time to ask the questions that clarify the situation.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The search function returns the correct value in the combobox?

    Is the combobox bound to field and purpose is to save value in record? Or is combobox unbound and purpose is to select criteria to filter form?

    If the first then make the combobox multi-column and include the other fields from the lookup table (they can be hidden if you prefer). Then expression in textbox can refer to the columns by index. Index begins with 0. So if the LENGTH (maybe another reserved word) is in column 2, its index is 1: =[comboboxname].[Column](1)
    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
    bbelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19
    So far so good !
    Changed the names to TITLE and YEER (year) (Would be cool to change combo box heading to proper 'Year', but ... baby steps)
    And got a text box to reflect data from my selection. YAY!
    I'll work out the details of this, but I will likely be back.
    Question lurking right now is how to set this form up to accept a new record (but I'll give it the old college try on my own).

    Thanks for the help!

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

Similar Threads

  1. Replies: 6
    Last Post: 05-06-2015, 12:56 PM
  2. Replies: 8
    Last Post: 06-06-2014, 09:48 AM
  3. Replies: 12
    Last Post: 03-22-2012, 02:48 AM
  4. Combining Data from 3 locations into one database
    By jparker1954 in forum Access
    Replies: 5
    Last Post: 08-30-2011, 06:42 AM
  5. Replies: 0
    Last Post: 01-26-2011, 05:51 PM

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