What do you call it?

Brando

Enthusiastic Novice
Local time
Today, 12:03
Joined
Apr 4, 2006
Messages
100
Before I start asking a lot of fool questions, I thought I'd do some research. But I don't know what key word(s) I should use.

I'm building a "management page" (for lack a a better term). It's a form focused on a table that contains custom information that can be referred to and used by the code of the database. For example, instead of hard coding a person's name or address or a numerical threshold, it's entered by the user in a form, stored in a table, and code can then be written to refer to it.

What do you database gurus call such a thing?
:confused:
 
I'd use the term 'configuration'. I often have one table with just one record that I can use a DLookup on. It would hold email of who to contact for questions about database, organizations name to display on report footers/headers or other information that is used throughout the database and pretty static.
 
Thank you for the reply.
I'm doing something similar. I want to use the "configuration" table to store a path to a network location were files are stored. So VB code would first indicate the path in the table, and then reference a particular file. Will DLookup work in that situation?
 
Yes, that will work for what you want it.
 
The network path in the table is \\filer\data\db2\, which is where logo.jpg is located.

I'm putting this in the Picture property of the graphic on a form:

=DLookup("[Graphics]","tblConfiguration"),"logo.jpg"

It can't find the file. Do I have a syntax issue or is this the wrong approach?
 
Yes. You should use an ampersand (&) for concatenation of strings:

=DLookup("[Graphics]","tblConfiguration") & "logo.jpg"

Also, I don't know if that network path will work. I remember trying something in the past and it only liked mapped network locations:

P:\filer\data\db2

Give it a shot though.
 
Another vote for Configuration.

Microsoft seems to call similar things "settings" I've also seen them referred to as "options"

Not sure how old you are but some of the older programs and some web sites now hold this kind of information in the config.sys file which is analogous to plogs dlookup single record table.

Another variation

Configuration Parameters
 
Thank you both for your help.

The path works fine in VB code behind a command button. For example, to open the network folder and display the folder contents. But it's not working here in the Picture property. I have also tried putting the graphic on a mapped drive. It can't find that either.

I'm using =DLookup("[Graphics]","tblConfiguration") & "logo.jpg" as you suggested. What could I be missing?
 
The trouble with that is there are two graphics on the form: the company logo and the database logo.

The problem is getting the graphic loaded from a path stored in a table. Like I said, the path works fine when it's hard coded into a command button.
 
Are you missing a backslash?

DLookup("[Graphics]","tblConfiguration") & "\logo.jpg"
 
Thank you for the thought. I simplified things to experiment. I put the entire path in the table (tblConfiguration) including the graphic name:

H:\Workfile\Graphics\logo.jpg

And I made the Picture property on the form as follows:

=DLookup("[Graphics]","tblConfiguration")

Still no luck though. I'm starting to think Access won't do what I want it to do.
 
One other suggestion - I assume you are using an image control, not a OLE object? You do need to use an image control. You have been talking about using the picture property when in fact you should be using the controlsource.

Create an image control and when prompted for a source, click Cancel. Then in the controlsource for the image control put

=DLookup("[Graphics]","tblConfiguration")

I'm assuming that \logo.jpg is now part of your graphic record

Alternatively what I have done in the past and I know works - I normally use this for displaying pictures in a continuous form - so should work for you is to modify your form recordsource to include your tblConfiguration - from your Dlookup you only have one record so it doesn't need to be linked to the other tables. Assuming the field is called [Graphics] then drag it to your Field line so it is reported.

If your recordset needs to be updateable then change the Recordset type to Dynaset (Inconsistent Updates) - you may need to do this in the form as well

The point is to bring the value through as part of your recordsource.

Then with your unbound image control put =[Graphics] in the controlsource

See how you get on with this suggestion
 
i call them constants

i generally have a single record "setup" table called "tblconstants" or something similar.
 
Thank you all! Particularly CJ London.

CJ,
you were right about Control Source. It works perfectly now. Also, it didn't matter

plog,
I ran some experiments and the path works regardless of mapped or unmapped network locations.
 

Users who are viewing this thread

Back
Top Bottom