Results 1 to 11 of 11

Thread: create add-ins for MS Access

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Lightbulb create add-ins for MS Access

    Hi guys,

    I would like to create add-ins for MS access. I am already long time bored during editing SQL code copying it to MS Word and using find and replace function. I would like to do add-ins able doing this in MS access directly. I have prepared some add-ins for Excel before, but I have no clue how to do it for Access. Can anybody help me?
    This add-ins should be very simple. I expect I will use textbox and command button only.

    Thanks for help.

    Boris

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: create add-ins for MS Access

    This is a Word add-in for Access which sounds like it might be something you are looking for.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Re: create add-ins for MS Access

    Quote Originally Posted by Hack
    This is a Word add-in for Access which sounds like it might be something you are looking for.
    Thanks for a try, but I do not think that add-ins is suitable for my problem, may be I have described my intention in wrong manner. Somethimes I am editing SQL command copied from Access in Word using fing and replace function. And I would like to do add-ins able do it directly in Access.

  4. #4
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: create add-ins for MS Access

    it should be quite simple...

    start a new project. pick add-in. change the settings on the connect designer to be for access & startup.. it should be very similar to the excel add-ins u have made.

    you could just use a textbox and button.. but u might be able to make it tap in more and do it directly in the queries....
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Re: create add-ins for MS Access

    Quote Originally Posted by Static
    it should be quite simple...

    start a new project. pick add-in. change the settings on the connect designer to be for access & startup.. it should be very similar to the excel add-ins u have made.

    you could just use a textbox and button.. but u might be able to make it tap in more and do it directly in the queries....
    Where I can do these steps. I have only VBA. Did you meant do it in visual studio?

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: create add-ins for MS Access

    Quote Originally Posted by bolcskei
    Where I can do these steps. I have only VBA.
    In that case, I think you will get better responses in this section.

    Moved to Office Developer

  7. #7
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: create add-ins for MS Access

    u only have VBA? i dont know if u can create an access add-in with vba...

    I know in excel u can just put it in the XLStart folder.. but im not sure about access...
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Re: create add-ins for MS Access

    Quote Originally Posted by Static
    u only have VBA? i dont know if u can create an access add-in with vba...

    I know in excel u can just put it in the XLStart folder.. but im not sure about access...
    I know, that when I create excel file I can save it as add-ins. But I did not see such a possibility in access. May be it woulb be enough for me have any access file which can be modified. I think I would be able in such a file make changes I want and save them.

  9. #9
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: create add-ins for MS Access

    what do u want this add-in to do?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Re: create add-ins for MS Access

    Quote Originally Posted by Static
    what do u want this add-in to do?
    I wrote in my post. Have in an add-ins textbox, where I can copy SQL query code a have possibility to find a selected text and replace it with another.

  11. #11
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: create add-ins for MS Access

    heres an idea....
    Add a reference to the MS DAO object library...
    Move the ref above the ADO reference...(very important!)
    VB Code:
    1. Public Sub FixSQL(sFind As String, sReplace As String, sQueryName As String)
    2.     Dim QDF As QueryDef
    3.     Dim SQL As String
    4.     Set QDF = CurrentDb.QueryDefs(sQueryName)
    5.     SQL = QDF.SQL
    6.     SQL = Replace(SQL, sFind, sReplace, , , vbTextCompare)
    7.     QDF.SQL = SQL
    8.     QDF.Close
    9. End Sub
    just put that in a module...
    when u need to use it..
    make a copy of the query u want to change... give it the new name
    then just call it in the debug window

    FixSQL "TABLE1","TABLE2","qryPULLDATA"
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width