Storing/updating a single variable?

klox

Registered User.
Local time
Today, 13:41
Joined
Aug 24, 2005
Messages
10
This deals with tables/forms/VBA code.

I have a table (tblData) that stores all information for a couple hundred records.

I have a method that copy/pastes all this information to a webbrowser based on the URL TitleBar. If the titlebar changes I need a way to update what to look for so it can paste it to the browser with the new titlebar. I don't want to have to update it for every record so I created a seperate table with one record with just an ID and the string for the titlebar. I have a seperate form from the main one that allows the user to update this and store it back into the table. The problem I am having is using the information from that second table (tblTitleBar) and puting it where it needs to be in the VBA code to access the correct browser.

I don't think any type of relationship will work because that just requires me to input the titlebar straight into each record for the first table anyways. I don't see any way of storing a changing variable besides puting it in a table. I was wondering if there was a way to code a call to the second table to retrieve the single record's field, but so far I have had no success.

Any help/words/advice would be greatly appreciated, thanks for reading my problem.
 
use Dlookup to get the variable out of the table, on a single row table you wont need criteria.

strTitleBar = DLookup("TitleField", "tblTitleBar")

HTH

Peter
 
Worked perfectly, thank you.
 

Users who are viewing this thread

Back
Top Bottom