Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938


    Quote Originally Posted by chubbychub View Post
    here is the file, i just deleted sensitive information
    , there are some macros, i didnt know how to remove them
    As long as there enough to replicate the issue.
    No workbook?
    That is essential don't you think?

    DB is too late for me.
    I can still work with the workbook if you supply that and a DB of my own.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  2. #17
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I removed what would have been the first reply because I thought I was being dense. After waiting for others to add clarity that I still don't have, I must ask:
    You're opening a connection to an Access database ( with cnn variable) and then trying to reference ActiveSheet (an Excel object) after making that connection, but Access has no such thing such as "ActiveSheet" and I see no reference to any workbook in that code. How is that supposed to work.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #18
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    Micron,
    O/P said in post 12 I shall point out that the macro is ran from excel and saving the name into a column on a cell in access. (not sure if this matters)
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #19
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I guess if I had made that first post y'all wouldn't have had to wait for post 12 to find out. Kinda surprised that no one asked before then but it didn't seem to matter. I guess my problem is that I did first look to see where the thread was posted and it is in Access forum.
    I just figured the connection was from Access to Access. My bad I guess.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #20
    chubbychub is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2019
    Posts
    17
    ok, its unlocked now.. took me a while to figure it out
    Attached Files Attached Files

  6. #21
    chubbychub is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2019
    Posts
    17
    HI, MOKE123 that was the answer, it does work, for some reason it didnt work when i tried it the first time (Probably my lack of knowledge, dont really know what i did) but i tried it again and it worked! thank you all for the replies. Thread solved, and rep added to all that replied, thank you all again Welshgasman and Micron.
    this works:

    rst![Name] = trim(Sheets("Quote").Range("C1"))

  7. #22
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    I did first look to see where the thread was posted and it is in Access forum.

    So did I but you would think there wouldn't be much of an issue with something as simple as Trim()

    Why is the vbe locked?
    Why are the tables hidden?

    You need to change the field name for the Field "Name"
    You should have gotten an error msg when you made the table
    Click image for larger version. 

Name:	name.PNG 
Views:	9 
Size:	8.7 KB 
ID:	50494
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  8. #23
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Glad you got it sorted.

    You may want to consider using access to link to your excel file and work from access.

    https://support.microsoft.com/en-gb/...source%20cells.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 08-14-2021, 04:53 AM
  2. Replies: 1
    Last Post: 09-14-2017, 02:19 PM
  3. Trim space between fields
    By rbolton in forum Forms
    Replies: 6
    Last Post: 04-14-2014, 08:33 PM
  4. Trim value
    By dada in forum Programming
    Replies: 5
    Last Post: 09-02-2010, 11:01 PM
  5. Trim
    By JMantei in forum Forms
    Replies: 1
    Last Post: 06-20-2006, 02:06 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