Results 1 to 9 of 9
  1. #1
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28

    Combine values from multiple fields


    My database allows the user to enter "Reason for visit" and "Next Visit" up to 3 times each. A client can be seen for more than one reason. The next visit must be associated with the reason for visit:

    Reason for Visit 1
    Next Visit 1

    Reason for Visit 2
    Next Visit 2

    Reason for Visit 3
    Next Visit 3

    Is there a way to take all of this and combine it some way so that I can query a "month" for next visit and anyone needing to be seen that month will display.

  2. #2
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65
    Well, reason to Visit appears to be a text field and Next Visit a Date/Time field. So you have a table with 3 fields whose headers are:

    ID (this refers to your actual person)
    Reason for Visit
    Next Visit

    If you were to query a month it would by default return all entries for where the criteria were the same.

  3. #3
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28
    The next visit field is text not date/time as the user enter for example Aug 2011.

  4. #4
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28
    I guess what I am wondering is if it is possbile to take Reason for Visit 1, Reason for Visit 2, Reason for Visit 3 and combine them all into 1 column?

  5. #5
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65
    You are looking to concatenate. See this example database from this post: http://www.access-programmers.co.uk/...ad.php?t=64611. In your use, you won't have field2 from their example. You can select design view on their qry2 and remove the second portion which shows field2.

  6. #6
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65
    Honestly though you need to reconsider your programming. There is no guaranteed way to sort by date on a hand entered field. One could type anything and you can't accurately group any together. An entry "Jul" would be different from "July". You'd need to convert this to a date or process some sort of validation against input

  7. #7
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28
    The page is not found when I use the link.

  8. #8
    jsimard is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    28
    I have used an input mask on each field.

  9. #9
    Rhino373 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    65
    Sorry the link appeared to shorten itself. Try clicking here.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-14-2010, 08:35 AM
  2. Look up values in multiple table fields
    By nmcentire in forum Programming
    Replies: 2
    Last Post: 11-12-2010, 02:02 PM
  3. Combine the values of two fields on a form
    By nyteowl in forum Access
    Replies: 4
    Last Post: 10-15-2010, 11:16 AM
  4. Combine two fields, Null fields involved
    By yes sir in forum Access
    Replies: 9
    Last Post: 10-03-2010, 09:20 AM
  5. Combine fields into one
    By cotri in forum Forms
    Replies: 2
    Last Post: 03-04-2010, 02:42 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