Persistent non-db data 
Author Message
 Persistent non-db data

Is there a way in Access to store persistent option
variables that aren't part of the database? (I suppose
you could kludge them into a database, but it would be
unnatural). For example, in Excel you have Names that can
be used. Is there any other such thing in Access?

One of the things I want to do is save a mode on exit.
Let's say there's three usage modes to a form that a user
can select. Right now, I open with a default, and the
user changes if desired. Is there a way to store the
option so that it reopens next time in the same mode as
closed so the user doesn't have to make the same
selection each time?

Using Access 2002...

Thanks,
Bryon



Mon, 29 Aug 2005 10:29:33 GMT  
 Persistent non-db data
You could create custom database properties and which you can update as
needed:

'Create property (only once, initialized to 10)
CurrentDb.Properties.Append CurrentDb.CreateProperty("MyProperty", dbLong,
10)

' Use the property
lngX= CurrentDb.Properties("MyProperty")

'change the property value
CurrentDb.Properties("MyProperty")=12    ' assign it to a new value

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Quote:

> Is there a way in Access to store persistent option
> variables that aren't part of the database? (I suppose
> you could kludge them into a database, but it would be
> unnatural). For example, in Excel you have Names that can
> be used. Is there any other such thing in Access?

> One of the things I want to do is save a mode on exit.
> Let's say there's three usage modes to a form that a user
> can select. Right now, I open with a default, and the
> user changes if desired. Is there a way to store the
> option so that it reopens next time in the same mode as
> closed so the user doesn't have to make the same
> selection each time?

> Using Access 2002...

> Thanks,
> Bryon



Mon, 29 Aug 2005 12:40:07 GMT  
 Persistent non-db data
Ah!! Very cool. I'll pursue that.

Thanks a million!
Bryon

Quote:
>-----Original Message-----
>You could create custom database properties and which
you can update as
>needed:

>'Create property (only once, initialized to 10)
>CurrentDb.Properties.Append CurrentDb.CreateProperty

("MyProperty", dbLong,
Quote:
>10)

>' Use the property
>lngX= CurrentDb.Properties("MyProperty")

>'change the property value
>CurrentDb.Properties("MyProperty")=12    ' assign it to
a new value

>--
>Sandra Daigle
>[Microsoft Access MVP]
>For the benefit of others please post all replies to
this newsgroup.


>> Is there a way in Access to store persistent option
>> variables that aren't part of the database? (I suppose
>> you could kludge them into a database, but it would be
>> unnatural). For example, in Excel you have Names that
can
>> be used. Is there any other such thing in Access?

>> One of the things I want to do is save a mode on exit.
>> Let's say there's three usage modes to a form that a
user
>> can select. Right now, I open with a default, and the
>> user changes if desired. Is there a way to store the
>> option so that it reopens next time in the same mode as
>> closed so the user doesn't have to make the same
>> selection each time?

>> Using Access 2002...

>> Thanks,
>> Bryon

>.



Mon, 29 Aug 2005 15:25:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Challenge: Storing non-persistent data in Word documents

2. Creating Persistent Menu Items (non-standard)

3. Frequent Non-Delivery,MSOE to Lycos: Persistent Transient Failure

4. Options Checked in ListBox Populated Manually Non-Persistent

5. Regression analysis: non-contiguous data, non-numeric data

6. Data entry form - keeping data persistent

7. Extracting non-secure data from a secure DB

8. Extracting non-secure data from a secure DB

9. How to open secure DB from non-secure DB

10. ASP reads data from Access db but data doesn't appear in db


 
Powered by phpBB® Forum Software © phpBB Group