Results 1 to 3 of 3
  1. #1
    donberti is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    2

    Extract information and merge them

    Hello everyone,

    I need to match 3 tables and merge only some values present in 4 columns of the final list I am getting.



    My data structure looks as follows:

    Table 1 - contracts, sales status a, b, c , status 1 , 2 , 3 , more info in several columns that I simply leave as they are
    Table 2 - people´s names
    Table 3 - vendors name

    I managed to query all of them and get an output. I merge then with a simple statement 4 columns I am interested in but I would like to specify some dependencies a bit better, so that I do not need to correct them again and again.

    I need to merge :
    1. A specific sales status (sales status "a" and sales status "b") with a further status 1, 2 or 3 (sales status and status are in 2 different columns). I managed to concatenate them all (all sales status with all status) but I would like to find a way to concatenate only some of the information. Example: Contract beta has a sales status new and a status in progress so the result should look like (in a single column): beta, new, in progress. All which is not sales status a or b should not be merged and stay as it is.

    2. The output of number 1. with two other columns showing a date sent to customer and date sent to finance. The columns with the dates have blanks.

    So my desired merge in one merged column should look like this :

    contract beta, quoted (sales status a), awaiting requestor (status 2), with date sent to customer (no need for the date, the information that beta shows a date sent to customer is enough) or
    contract delta, no quoted completed (sales status b) , work in progress (status 2), with date sent to finance.

    I have of course no clue how to merger in a way that I can choose the specific sales status a or b. I do believe that it is possible with a select statement but I am not sure how should I enter it in access. And, of course, I am a bloody beginner...

    Any hint or help is appreciated,
    Have a great week-end!!
    Dona Berti

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,948
    I expect would need nested IIf() expression. If the expression in query is too lengthy then build a custom function that constructs string using conditional code structures. The 4 fields would be passed in arguments of the function. Call the function from query or textbox.
    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
    donberti is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    2
    Thank you a ton, I will try!!! Best regards, Dona

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

Similar Threads

  1. Extract Date
    By bigroo in forum Forms
    Replies: 38
    Last Post: 11-25-2012, 08:32 PM
  2. Extract age profiles of people
    By Richie27 in forum Programming
    Replies: 3
    Last Post: 05-04-2012, 12:14 PM
  3. extract something from a field
    By tozey in forum Queries
    Replies: 4
    Last Post: 02-24-2012, 08:54 AM
  4. Replies: 10
    Last Post: 08-18-2011, 04:27 PM
  5. Extract two last recodes
    By yosik20 in forum Queries
    Replies: 4
    Last Post: 04-12-2011, 01:35 PM

Tags for this Thread

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