Results 1 to 5 of 5
  1. #1
    nyteowl is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    6

    Combine the values of two fields on a form

    I want to take the existing values in two fields on a short form and combine them to create a unique ID for each record.



    The first field is a text field that contains an acronym representing a company, e.g., USPS. This value will be selected from a Combo Box.

    The second field contains a date (Short Date format, 10/11/2010), which will not necessary be the current date.

    I want to change the Date field into a yyyymmdd format, insert a period at the end, and then append the acronym field so I'll end up with something that looks like this:

    20101011.USPS

    The ultimate goal is for this to run as an On Exit Event Procedure after I enter the date and move on to the next field on my form.

    Thanks in advance for the assist.

  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
    Along the lines of

    Format(DateField, "yyyymmdd") & "." & TheTextField
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nyteowl is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    6
    Thanks much!!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    nyteowl is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    6
    Thanks again...

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

Similar Threads

  1. Combine two fields, Null fields involved
    By yes sir in forum Access
    Replies: 9
    Last Post: 10-03-2010, 09:20 AM
  2. Combine First and Last name fields for Report
    By yes sir in forum Reports
    Replies: 32
    Last Post: 08-31-2010, 07:31 PM
  3. Combine one item fields in one field
    By romadm in forum Reports
    Replies: 7
    Last Post: 06-04-2010, 11:09 PM
  4. Combine fields into one
    By cotri in forum Forms
    Replies: 2
    Last Post: 03-04-2010, 02:42 PM
  5. form formula to combine two fields
    By InvGrp in forum Forms
    Replies: 1
    Last Post: 10-20-2006, 12:10 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