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
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.
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.
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....
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?
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
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...
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.
Re: create add-ins for MS Access
what do u want this add-in to do?
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.
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:
Public Sub FixSQL(sFind As String, sReplace As String, sQueryName As String)
Dim QDF As QueryDef
Dim SQL As String
Set QDF = CurrentDb.QueryDefs(sQueryName)
SQL = QDF.SQL
SQL = Replace(SQL, sFind, sReplace, , , vbTextCompare)
QDF.SQL = SQL
QDF.Close
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"