Apologies in advance if this has been asked lots of times before - I've trawled through many threads both here and elsewhere and still haven't been able to sort things out....
...the problem is simple [or so I mistakenly thought]. All I want to be able to do is to copy the results of a query [which will always return one result] into an unbound textbox - something I thought would be straightforward in Access - but not so.... or I'm missing something...
Here's the deal - I've put together a fairly simple database which contains details about various products - along with an accompanying photograph - a table [Products] is used to store various details about each product - including a 'relative' pathname pointing to the location of the image for that product. I also have an unbound textbox on the form where the user can enter the 'base directory' to which the relative directories are appended to find the true location of each image.
When I manually type the base directory into the unbound text box everything works fine, but, as you'd expect when I close the database and restart it, the text box is empty and the user needs to populate it again with the base directory.....
...Obviously this isn't a desirable situation I at first I thought Access 2002 might provide some sort of persistent variable mechanism or datastore whereby you could store single 'configuration'-type variables which retain their values between subsequent database shutdowns and startups.... apparently there is no such feature....
...so, my next approach was to create a two-column database table [one column for the name of the config variable, and one column for the value of the config variable] - for now the table contains only one entry pair - "ImageBaseDir", "C:\"
The problem I'm now having is that I can't get Access 2002 to read the data from the configuration table and place the results in an unbound text box....
...I'm sure I'm not the only one that wants to achieve this sort of thing, so I'd appreciate it if anyone could point me in the right direction!
Cheers!
Shane.
...the problem is simple [or so I mistakenly thought]. All I want to be able to do is to copy the results of a query [which will always return one result] into an unbound textbox - something I thought would be straightforward in Access - but not so.... or I'm missing something...
Here's the deal - I've put together a fairly simple database which contains details about various products - along with an accompanying photograph - a table [Products] is used to store various details about each product - including a 'relative' pathname pointing to the location of the image for that product. I also have an unbound textbox on the form where the user can enter the 'base directory' to which the relative directories are appended to find the true location of each image.
When I manually type the base directory into the unbound text box everything works fine, but, as you'd expect when I close the database and restart it, the text box is empty and the user needs to populate it again with the base directory.....
...Obviously this isn't a desirable situation I at first I thought Access 2002 might provide some sort of persistent variable mechanism or datastore whereby you could store single 'configuration'-type variables which retain their values between subsequent database shutdowns and startups.... apparently there is no such feature....
...so, my next approach was to create a two-column database table [one column for the name of the config variable, and one column for the value of the config variable] - for now the table contains only one entry pair - "ImageBaseDir", "C:\"
The problem I'm now having is that I can't get Access 2002 to read the data from the configuration table and place the results in an unbound text box....
...I'm sure I'm not the only one that wants to achieve this sort of thing, so I'd appreciate it if anyone could point me in the right direction!
Cheers!
Shane.