Re: Registering programs in access



Sorry, I don't know what to say.

It worked fine for me with no changes to the sample code. In fact, I copied
your code into a test database, and it worked fine for me.

Function Call_BFB_Brad(strDB)
Dim Called_DB
'Create text string containing "Database to Call".
Called_DB = strDB

With COMAddIns("TsiSoon90.Connect").Object
.FileToOpen = Called_DB
.Exclusive = False
.FileIsAdp = False
.CloseAll
End With
End Function

Of course, you really should be declaring your variable types as Strings,
and there's no reason for variable Called_DB:

Function Call_BFB_Brad(strDB As String)

With COMAddIns("TsiSoon90.Connect").Object
.FileToOpen = strDB
.Exclusive = False
.FileIsAdp = False
.CloseAll
End With

End Function




--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Dr. Brad" <rbthomas@xxxxxxxxxxxxx> wrote in message
news:GPQCf.5233$2O6.2500@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi Douglas,
> I did and I got the same results! I also reregisered "TsiSoon90.dll". I
> recieved the same error
> " Run-time Error 91: Object variable or With block variable not set." It
> hangs on the first statment within the With block (i.e..FileToOpen =
> "c:\db1.mdb"). If I take that ststement out, it hangs on the next
> statement etc.
>
> It seem to me that it wants me to Define an Object; Though, I do not know
> what object Object.
>
> Brad
>
> "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
> news:%23EgIp0DJGHA.3696@xxxxxxxxxxxxxxxxxxxxxxx
>> Just as a test, create a new database strictly to test TSISoon.
>>
>> If it works, try importing all of the objects from your existing database
>> into a new one.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>


.



Relevant Pages

  • RE: Cannot do update on a record. Please help.
    ... do you have any sample code that I can learn from? ... Public Function CreateCmdsAndUpdate(ByVal mySelectQuery As String, ... ByVal myConnection As OleDb.OleDbConnection) As ... > got modified into the dataset will be updated ..not entire database. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: DSNLes Connection
    ... The Connect property must start with ODBC; ... If you're using a different connect string than in the sample code, ... Would a Fox Pro free table structure be referenced by a database name? ...
    (microsoft.public.access.modulesdaovba)
  • Re: URGENT! COMMAND CODE HELP FOR AUTOMATING EMAIL
    ... (no private e-mails, please) ... querying the database and trying to run a module I created, ... Dim strTo As String ... Dim strsubject As String ...
    (microsoft.public.access.formscoding)
  • Dynamic MENU ITEM in ASP.Net
    ... I am doing a menu in asp.net here is the sample code for that: ... Now the m_Menuis the string array which has the string ... i got from database. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A little Rolodex [revised]
    ... including alpha sort and searching for any embedded string, ... In this application, a database is a directory, ... you may optionally provide any alternate UCASE program, ... NN -> first store NN as key length ...
    (comp.sys.hp48)