Results 1 to 2 of 2
  1. #1
    abublitz is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    6

    Search Box Using Concatenate values?

    This has me pretty stumped and I've not really had much luck googling it.




    I have two tables that are linked

    tblPartNumberSeries - holds information pertaining to the number ranges for my parts
    tblParts - holds the actual part number data

    On my form, frmParts I want to place an unbound textbox/button to use as a search. The issue is, the value that the user will be searching for is a concatenate value that is not stored in either of the tables.

    For example, I want to go to the record for part number 010176

    010 = prefix that is stored in PartNumberPrefix in the tblPartNumberSeries
    176 = the value stored in PartNumber in tblParts

    On my form, I have an un-editable textbox, txtPartNumberDisplay that shows this part number to the user, for their benefit, but this value is not stored anywhere. This value is generated by using this code in the Control Source
    =[cboPartNumberSeriesID].[Column](1) & [txtPartNumber] so it takes what the user selects in cboPartNumberSeriesID combobox (values from tblPartNumberSeries) and adds it to the value in txtPartNumber which is the field for the PartNumber in tblParts.

    Also, while all my concatenate part numbers are all the same length (6 characters), my prefix are 3-4 characters in length.


    Is this confusing? I can link my DB too.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How do you plan on searching? You can certainly use a concatenated value, like in a query:

    WHERE Field1 & Field2 = "010176"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Concatenate values from related records
    By AccessDennis in forum Queries
    Replies: 11
    Last Post: 04-29-2016, 05:22 PM
  2. Replies: 11
    Last Post: 02-11-2015, 01:30 PM
  3. Replies: 5
    Last Post: 03-11-2013, 03:12 PM
  4. Replies: 1
    Last Post: 03-13-2012, 06:11 PM
  5. Replies: 3
    Last Post: 10-16-2009, 09:27 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