Re: SetOption "Default Database Directory"



I understand what you mean, but with about 30 queries, that is alot of
changing and eliminates the chance to distribute and allowing them to set
their own network directory.

Acutally that is not a key problem because I can code the rowsource to set
after the Default Directory Change and that works the first time I open the
form.

As I said it works except for the first time the database opens and is set
to a new Directory, What I can't figure out, is why dosent it work the first
time, is the form Open event the right place to put it?

I get a Compile error the first time I open the Form and it is set to a new
Directory, even with the rowsource problem solved. Then when I close the
Database and reopen it and the form, everything is fine. Even the rowsource
can be preset in the Properties rather than by code.

John

"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
news:eA74PStxFHA.3860@xxxxxxxxxxxxxxxxxxxxxxx
> You should specify the complete path rather than simply the file name:
>
> SELECT DISTINCTROW ExternalBook.ExternalBook, ExternalBook.Status,
> ExternalBook.Default
> FROM ExternalBook IN "c:\Program Files\Operations\ExternalDbLogs.mdb"
> WHERE ((Not (ExternalBook.ExternalBook) Is Null))
> ORDER BY ExternalBook.ExternalBook;
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "john" <none@xxxxxxxx> wrote in message
> news:%23LhERFrxFHA.596@xxxxxxxxxxxxxxxxxxxxxxx
>> Yes it is External, here is the SQL:
>> SELECT DISTINCTROW ExternalBook.ExternalBook, ExternalBook.Status,
>> ExternalBook.Default
>> FROM [ExternalDbLogs.mdb].ExternalBook
>> WHERE ((Not (ExternalBook.ExternalBook) Is Null))
>> ORDER BY ExternalBook.ExternalBook;
>>
>> As I have said, the SQL works Okay once I close and reopen the DataBase,
>> Just not the first time I open it.
>>
>>
>> "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
>> news:OYvNjioxFHA.3812@xxxxxxxxxxxxxxxxxxxxxxx
>>> I'm having a hard time imagining why the rowsource for a list or combo
>>> box would care about the default database directory.
>>>
>>> Are you trying to refer to an external database in the rowsource? If so,
>>> what does your SQL look like?
>>>
>>> --
>>> Doug Steele, Microsoft Access MVP
>>> http://I.Am/DougSteele
>>> (no e-mails, please!)
>>>
>>>
>>>
>>> "john" <none@xxxxxxxx> wrote in message
>>> news:Orl62$nxFHA.3236@xxxxxxxxxxxxxxxxxxxxxxx
>>>> In using the following on the Open event of a form:
>>>> SetOption "Default Database Directory", "c:\Program Files\Operations"
>>>>
>>>> I get errors from list and combo boxes that fire before this event and
>>>> cannot find the Databases they are set to, unless I Code the rowsource
>>>> after this event, but even beyond that I get other error's too, unless
>>>> I close the database and reopen it with that as the now Default
>>>> Directory.
>>>>
>>>> Question is, am I putting the SetOption in the wrong place, can I make
>>>> it set the Default on the opening of the Database, instead of the Open
>>>> form event?
>>>>
>>>> Thanks John
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Capture of First Use Date
    ... Here is another alternative done completely within the database. ... created when the main form opens. ... the first time the application is used. ... >> Where do you want to store it? ...
    (microsoft.public.access.forms)
  • MS access 2007 creates a copy when I close it
    ... I have a database which is located on my server in a shared company folder. ... When one of my end users opens the database and then closes it, ... The first time he ...
    (microsoft.public.access.gettingstarted)
  • Report initialization? problem.
    ... When I open a database, ... FIRST time I preview a report it appears that Access is ignoring the ... Opens fine. ...
    (microsoft.public.access.reports)
  • Report initialization? problem.
    ... When I open a database, ... FIRST time I preview a report it appears that Access is ignoring the ... Opens fine. ...
    (microsoft.public.access.reports)
  • Re: Qusnetsoft suddenly unregistered
    ... open the program for the first time, ... If I click yes, the program opens and appears to work except that, as I ... Werner Ruotsalainen - Microsoft MVP - Windows - Mobile Devices. ...
    (microsoft.public.pocketpc)