Page 3 of 3 FirstFirst 123
Results 31 to 42 of 42
  1. #31
    316854 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2013
    Posts
    44

    I need help with parsing again.

    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234 % 34.043019, -118.267256



    I need help with parsing again.

    To get only John Smith I use:
    Left([fieldname], InStr([fieldname], "@") - 1)

    To get only 34.043019, -118.267256 I use:
    Trim(Mid([fieldname],InStr(Nz([fieldname],""),"%")+1))

    To get only 1234 N Main Ave Los Angeles CA 90001-1234 I use what?

    Thanks

  2. #32
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Gets complicated.
    Will the @ and % characters always be present?

    x represents the fieldname:

    Mid(x, InStr(x,"@")+2, InStr(x,"%")-Instr(x,"@")-3)
    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. #33
    316854 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2013
    Posts
    44

    Changing multiple records in a field of a query.

    Thanks.

    The string functions work as desired.

    In a table I have:

    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    Mark Anderson @ 1234 N Main Ave Los Angeles CA 90001-1234
    Daniel Williams @ 1234 N Main Ave Los Angeles CA 90001-1234

    In that table, I'm going to add GPS coordinates to each record so it will look like this:

    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234 % 34.043019, -118.267256
    Mark Anderson @ 1234 N Main Ave Los Angeles CA 90001-1234 % 34.043019, -118.267256
    Daniel Williams @ 1234 N Main Ave Los Angeles CA 90001-1234 % 34.043019, -118.267256

    I have a query that parses the strings into 3 fields, for example:

    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234 % 34.043019, -118.267256

    John Smith

    1234 N Main Ave Los Angeles CA 90001-1234

    34.043019, -118.267256

    How do I en masse update the query to replace the old records with the changed records?

  4. #34
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    You are saving all this info into one field? Why? Or are you trying to split up imported data into separate fields?
    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. #35
    316854 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2013
    Posts
    44
    They are places that I drive to.

    I use them to build a table of places that I drove to with the corresponding dates.

  6. #36
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Doesn't answer my questions.

    Discrete data should not be bundled into same field in table. As you discovered, it is harder to parse string data than to concatenate.
    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.

  7. #37
    316854 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2013
    Posts
    44

    What's the best way to build this database?

    There could be multiple John Smiths.

    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 2345 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 3456 N Main Ave Los Angeles CA 90001-1234

    Although I guess the gps coordinates will not change.

    What's the best way to build this database?

  8. #38
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Yes, there can be multiple John Smiths. Determining whether or not the same person demands vigilant data management. People move. These could be the same person or different people.

    What is this database for?
    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.

  9. #39
    316854 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2013
    Posts
    44

    I document the places that I have driven to.

    Yes, sometimes multiple customers share the name John Smith, but sometimes a customer like John Smith has multiple addresses.

    I document the places that I have driven to.

    For example:

    Specific Date:
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234

    Specific Date:
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234

    Specific Date:
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234

    Specific Date:
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234
    John Smith @ 1234 N Main Ave Los Angeles CA 90001-1234

  10. #40
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Assuming there are repeat visits to customer/location, should have a table of Customers or Locations, unique record for each.

    Then another table to document visits to customer or location. This table would have fields for CustomerID or LocationID and DateVisit.

    Still doesn't answer if all this info is in one field.
    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.

  11. #41
    316854 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2013
    Posts
    44

    I need to make a query that sorts who I visited by date.

    I used a misleading example.

    Daily, I visit the people listed below.

    I need to document the date of each visit, the order of the visits for each date, and who I visited for each date.

    I need to match each customer to their corresponding address and gps coordinates.

    I need to make a query that sorts who I visited by date from newest to oldest, and then by order from smallest to largest.

    The query needs to show the correspoding addresses and gps coordinates of the customers.

    Specific Date:
    Smith
    Johnson
    Williams
    Brown
    Jones
    Miller
    Davis
    Garcia
    Hansen
    Wilson
    Martinez
    Anderson
    Taylor
    Thomas

    Specific Date:
    Smith
    Johnson
    Williams
    Brown
    Jones
    Miller
    Davis
    Garcia
    Hansen
    Wilson
    Martinez
    Anderson
    Taylor
    Thomas

    Specific Date:
    Smith
    Johnson
    Williams
    Brown
    Jones
    Miller
    Davis
    Garcia
    Hansen
    Wilson
    Martinez
    Anderson
    Taylor
    Thomas


    Thanks

  12. #42
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Doesn't change comments from my previous post.
    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.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using an Excel Formula in Access
    By BEI77 in forum Access
    Replies: 6
    Last Post: 05-08-2014, 05:08 PM
  2. Anyone able to translate a formula from excel?
    By dniezby in forum Programming
    Replies: 10
    Last Post: 05-21-2013, 01:10 PM
  3. Excel Formula into Access Query
    By dr4ke in forum Queries
    Replies: 7
    Last Post: 06-25-2012, 06:46 AM
  4. Excel Formula Needed in Access
    By bmschaeffer in forum Queries
    Replies: 4
    Last Post: 01-18-2012, 01:13 PM
  5. Replies: 0
    Last Post: 09-03-2009, 01:58 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