Conventional approaches are to use an .ini file or registry entry and retrieve the information at startup of your application. For ini file use, have a look for getprofilestring at google. Access, since 97 at least, has some built in functions for registry read/write. I can't tell you about VB6 but you shouldn't find it too difficult to find some API samples for create/read/write of registry keys for your application. Unconventional approaches include creating a textfile in a determinate location (you can retrieve several special folders such as the system folder by API call). In Access you could create and append a property to a database object (or even something like a form document object) that thereafter is persistent between application sessions.
I have the following DAO routine run to create a text property when it doesn't exist. It runs in the error handler when I attempt to set a property that doesn't exist and just creates it on the fly if it doesn't exist. I use it to store things like the last compacted date but it could be used to store any information you want to store between sessions of an Access Front End application.
Sub AddProperty(strPropertyName As String, db As Database)
Dim prp As Property
Set prp = db.CreateProperty(strPropertyName, dbText, False)
db.Properties.Append prp
End Sub
While this won't work in your
VB application, perhaps there are other persistent properties you can create and set.
Ciao
Jürgen Welz
Edmonton AB Canada
[email protected]