Results 1 to 14 of 14
  1. #1
    Castillb is offline Novice
    Windows XP Access 2002
    Join Date
    May 2013
    Posts
    11

    Can you map certain fields on an new Access table to an existing Access table?

    I've imported an Excel file into Access as a textfile. All of the information on the Excel spreadsheet was succefully imported in Access. The only problem that I have is that some of the fields on the table have quotation marks (e.g. "Stults, David, "KWK, Inc.", "7,860.27", etc.) My first question is whether these quotation marks can be removed from the table.



    My second question - There is information on this table that needs to be manually entered on a data entry screen in Access. Is there anyway to automate this process?

    Please help...
    Attached Thumbnails Attached Thumbnails AllocationSchedule.jpg  

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Try in a query, look: Replace([mystring],'"',"")

    Change mystring to the field that has the double quotes.
    You can change look to any name you like.
    This does not change the data in the table, just the output of the query.


    Dale

  3. #3
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    if you want to change the data in the table try a update query.
    SQL= UPDATE Table2 SET Table2.mystring = Replace([mystring],'"',"");

    Change Table2 to your table name and change mystring to your field name.

    You should back up your database or at least your table before trying this.


    Dale

  4. #4
    Castillb is offline Novice
    Windows XP Access 2002
    Join Date
    May 2013
    Posts
    11
    Dale,

    Do you mind telling me how I would go about this? I've ran the query and have just the information I want/need. I currently have the query up in front of me, on Datasheet View.

    I'm new to to Access and have been using forums and other online sites for help. If you woulndt mind explaining or providing me with the info I should be searching for online, I'd really appreciate it.



    Quote Originally Posted by rzw0wr View Post
    Try in a query, look: Replace([mystring],'"',"")

    Change mystring to the field that has the double quotes.
    You can change look to any name you like.
    This does not change the data in the table, just the output of the query.


    Dale

  5. #5
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    If you just want the data displayed and not changed.
    In query design view, in an empty column, Insert the replace function I gave you.
    If look is OK as a field name, leave it alone. I f not change look to whatever you like.
    Change "mystring" to the field name that holds the data with the double quotes.
    Be sure to use [], brackets around you field names if the have a space.

    Let us know if you have trouble.
    Dale

  6. #6
    Castillb is offline Novice
    Windows XP Access 2002
    Join Date
    May 2013
    Posts
    11
    Dale,

    When I try this I get the following error message:

    Syntax error (comma) in query expression '[Allocation Schedule].[Replace([Replace9[Iff Legal Fees Allocations],"",""]'.


    Quote Originally Posted by rzw0wr View Post
    If you just want the data displayed and not changed.
    In query design view, in an empty column, Insert the replace function I gave you.
    If look is OK as a field name, leave it alone. I f not change look to whatever you like.
    Change "mystring" to the field name that holds the data with the double quotes.
    Be sure to use [], brackets around you field names if the have a space.

    Let us know if you have trouble.
    Dale

  7. #7
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Syntax error (comma) in query expression '[Allocation Schedule].[Replace([Replace9[Iff Legal Fees Allocations],"",""]'.
    Are you trying to remove the comas?
    try Look:Replace([Legal Fees Allocations],"','"
    Single quote around coma.

    Dale

  8. #8
    Castillb is offline Novice
    Windows XP Access 2002
    Join Date
    May 2013
    Posts
    11
    Dale,

    I'm trying to remove only the quotation marks such as the ones in line 1 shown as "XYZ, Inc."

    The commas, I dont mind being displayed on the table.


    Quote Originally Posted by rzw0wr View Post
    Are you trying to remove the comas?
    try Look:Replace([Legal Fees Allocations],"','"
    Single quote around coma.

    Dale

  9. #9
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    If you just want the data displayed and not changed.
    In query design view, in an empty column, Insert the replace function I gave you.
    If look is OK as a field name, leave it alone. I f not change look to whatever you like.
    Change "mystring" to the field name that holds the data with the double quotes.
    Be sure to use [], brackets around you field names if the have a space.

    look: Replace([mystring],'"',"")

    Note: copy and paste this in your query.
    Notice that the first double quote is delimited with 2 single quotes. 1 before and 1 after.
    the coma is a function separator. The 2nd set of double quotes say to replace a single double quote with nothing.

    Let us know if you need more help. I am here till about 9:00 Eastern time.
    Dale

  10. #10
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    YourFieldName:Replace([Legal Fees Allocations],'"',""

    Should look something like this when you are finished.


    Dale

  11. #11
    Castillb is offline Novice
    Windows XP Access 2002
    Join Date
    May 2013
    Posts
    11
    Dale,



    I made the enty as shown in your last post, but now I'm getting a the following error message:

    "the Expression you entered contains invalid syntax"

    I really appreciate you helping me on this.


    Click image for larger version. 

Name:	QueryEntry.jpg 
Views:	6 
Size:	11.8 KB 
ID:	12360

    Quote Originally Posted by rzw0wr View Post
    YourFieldName:Replace([Legal Fees Allocations],'"',""

    Should look something like this when you are finished.


    Dale

  12. #12
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Have you added the table to the query?
    Have you added the field[Legal Fees Allocations] to the query?

    Can you upload a copy of your db.

    Dale

  13. #13
    Castillb is offline Novice
    Windows XP Access 2002
    Join Date
    May 2013
    Posts
    11
    Dale,

    Yes, I've done both. Click image for larger version. 

Name:	QueryView.jpg 
Views:	6 
Size:	58.0 KB 
ID:	12362


    Quote Originally Posted by rzw0wr View Post
    Have you added the table to the query?
    Have you added the field[Legal Fees Allocations] to the query?

    Can you upload a copy of your db.

    Dale

  14. #14
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    In the jpeg you sent, you have the wrong function .
    Replace the one with the iif to the one with just the replace I sent you.

    Can you upload your database?

    Dale

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

Similar Threads

  1. Using random fields in Excel to populate Access table
    By cryswater in forum Import/Export Data
    Replies: 3
    Last Post: 05-14-2013, 02:50 PM
  2. Replies: 2
    Last Post: 01-28-2013, 08:59 PM
  3. Replies: 11
    Last Post: 07-24-2012, 07:50 PM
  4. Replies: 7
    Last Post: 04-15-2011, 08:46 AM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 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