PC Review


Reply
Thread Tools Rate Thread

Create a label that equals a table description

 
 
=?Utf-8?B?TWF0dGFudGFsaXNz?=
Guest
Posts: n/a
 
      23rd Jun 2006
[I have this cross-posted at
http://www.mrexcel.com/board2/viewtopic.php?t=218716 --- I'm not getting any
response there yet, so am also putting up here to increase the chance of a
solution]

Hello,

Is it possible to have a label on a form that references a table description
for its text? [With Access2000]

That is, I have, say, tblMyTable with description "Data for
01.01.06-01.31.06" and I have lblMyLabel on frmMyForm - and I want the text
of lblMyLabel to be "Data for 01.01.06-01.31.06". Of course, the point of
this is that, say, when I add in data for Feb. 1st and update the table
description to "Data for 01.01.06-02.01.06", I want lblMyLabel to update as
well.

Is that possible?

Thanks,
matt
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      23rd Jun 2006
If I take your example literally, you have one table for each month.
Embedding data (i.e., month-of-data) in tablenames is likely to cause you no
end of headaches, as this design will not be able to use the Access
functions/features that rely on a well-normalized data structure.

What the example seems to describe isn't a relational database, but a
spreadsheet.

Could you use a single table, and add a single field to your existing
structure (DateOf XXXXX -- I'm not clear on what you are measuring)?

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Mattantaliss" <(E-Mail Removed)> wrote in message
news:561BA379-DB5E-4705-9D41-(E-Mail Removed)...
> [I have this cross-posted at
> http://www.mrexcel.com/board2/viewtopic.php?t=218716 --- I'm not getting
> any
> response there yet, so am also putting up here to increase the chance of a
> solution]
>
> Hello,
>
> Is it possible to have a label on a form that references a table
> description
> for its text? [With Access2000]
>
> That is, I have, say, tblMyTable with description "Data for
> 01.01.06-01.31.06" and I have lblMyLabel on frmMyForm - and I want the
> text
> of lblMyLabel to be "Data for 01.01.06-01.31.06". Of course, the point of
> this is that, say, when I add in data for Feb. 1st and update the table
> description to "Data for 01.01.06-02.01.06", I want lblMyLabel to update
> as
> well.
>
> Is that possible?
>
> Thanks,
> matt



 
Reply With Quote
 
Wolfgang Kais
Guest
Posts: n/a
 
      23rd Jun 2006
Hello Matt.

"Mattantaliss" wrote:
> Is it possible to have a label on a form that references a table
> description for its text? [With Access2000]
>
> That is, I have, say, tblMyTable with description "Data for
> 01.01.06-01.31.06" and I have lblMyLabel on frmMyForm - and I
> want the text of lblMyLabel to be "Data for 01.01.06-01.31.06".
> Of course, the point of this is that, say, when I add in data for Feb.
> 1st and update the table description to "Data for 01.01.06-02.01.06",
> I want lblMyLabel to update as well.
>
> Is that possible?


Using a label, you will have to change it's caption when the form opens.
You can also use a textbox with calculated control source.
For example, using dao code, you could use a function like this for the
calculation:

Function TableDescription(TableName As String) As String
On Error Resume Next
Dim dbs As Database, tdf As TableDef
Set dbs = CurrentDb
Set tdf = dbs.TableDefs(TableName)
TableDescription = tdf.Properties("Description")
Set tdf = Nothing
Set dbs = Nothing
End Function

Then, use this as control souce for a textbox:
=TableDescription("tblMyTable")

--
Regards,
Wolfgang


 
Reply With Quote
 
=?Utf-8?B?TWF0dGFudGFsaXNz?=
Guest
Posts: n/a
 
      24th Jun 2006
Hi Jeff,

Actually, I have a few different tables that track various call center
metrics, and each one has a growing date range of data. So, for example,
tblMyTable would have 'Calls Taken' and 'AHT', and has those data for the
dates of, say, 11.01.05-06.22.06. Then tomorrow, when I receive today's
totals, I'd add those data in to the table and update the description under
the table's properties to something like "CallsTaken/AHT Data for
11.01.05-06.23.06".
What I am trying to do here is take the text of that table's description and
have it be the text of a label on a form I have. Does that help clarify a bit?

matt

"Jeff Boyce" wrote:

> If I take your example literally, you have one table for each month.
> Embedding data (i.e., month-of-data) in tablenames is likely to cause you no
> end of headaches, as this design will not be able to use the Access
> functions/features that rely on a well-normalized data structure.
>
> What the example seems to describe isn't a relational database, but a
> spreadsheet.
>
> Could you use a single table, and add a single field to your existing
> structure (DateOf XXXXX -- I'm not clear on what you are measuring)?
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
>
> "Mattantaliss" <(E-Mail Removed)> wrote in message
> news:561BA379-DB5E-4705-9D41-(E-Mail Removed)...
> > [I have this cross-posted at
> > http://www.mrexcel.com/board2/viewtopic.php?t=218716 --- I'm not getting
> > any
> > response there yet, so am also putting up here to increase the chance of a
> > solution]
> >
> > Hello,
> >
> > Is it possible to have a label on a form that references a table
> > description
> > for its text? [With Access2000]
> >
> > That is, I have, say, tblMyTable with description "Data for
> > 01.01.06-01.31.06" and I have lblMyLabel on frmMyForm - and I want the
> > text
> > of lblMyLabel to be "Data for 01.01.06-01.31.06". Of course, the point of
> > this is that, say, when I add in data for Feb. 1st and update the table
> > description to "Data for 01.01.06-02.01.06", I want lblMyLabel to update
> > as
> > well.
> >
> > Is that possible?
> >
> > Thanks,
> > matt

>
>
>

 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      24th Jun 2006
Matt

If you are saying that you use different tables to store the same kind of
data, then my earlier response stands.

If you are using the table's Description property to document the range of
dates contained in the table, you'll have to keep updating and updating and
.... the Description.

Instead, why not do a query that returns the Maximum date in the table?

Perhaps if you provided an actual (or imaginary) example of your data and
the structure, newsgroup readers may be able to offer further suggestions.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Mattantaliss" <(E-Mail Removed)> wrote in message
news:5E663B97-382F-45DD-9EF5-(E-Mail Removed)...
> Hi Jeff,
>
> Actually, I have a few different tables that track various call center
> metrics, and each one has a growing date range of data. So, for example,
> tblMyTable would have 'Calls Taken' and 'AHT', and has those data for the
> dates of, say, 11.01.05-06.22.06. Then tomorrow, when I receive today's
> totals, I'd add those data in to the table and update the description
> under
> the table's properties to something like "CallsTaken/AHT Data for
> 11.01.05-06.23.06".
> What I am trying to do here is take the text of that table's description
> and
> have it be the text of a label on a form I have. Does that help clarify a
> bit?
>
> matt
>
> "Jeff Boyce" wrote:
>
>> If I take your example literally, you have one table for each month.
>> Embedding data (i.e., month-of-data) in tablenames is likely to cause you
>> no
>> end of headaches, as this design will not be able to use the Access
>> functions/features that rely on a well-normalized data structure.
>>
>> What the example seems to describe isn't a relational database, but a
>> spreadsheet.
>>
>> Could you use a single table, and add a single field to your existing
>> structure (DateOf XXXXX -- I'm not clear on what you are measuring)?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>>
>> "Mattantaliss" <(E-Mail Removed)> wrote in message
>> news:561BA379-DB5E-4705-9D41-(E-Mail Removed)...
>> > [I have this cross-posted at
>> > http://www.mrexcel.com/board2/viewtopic.php?t=218716 --- I'm not
>> > getting
>> > any
>> > response there yet, so am also putting up here to increase the chance
>> > of a
>> > solution]
>> >
>> > Hello,
>> >
>> > Is it possible to have a label on a form that references a table
>> > description
>> > for its text? [With Access2000]
>> >
>> > That is, I have, say, tblMyTable with description "Data for
>> > 01.01.06-01.31.06" and I have lblMyLabel on frmMyForm - and I want the
>> > text
>> > of lblMyLabel to be "Data for 01.01.06-01.31.06". Of course, the point
>> > of
>> > this is that, say, when I add in data for Feb. 1st and update the table
>> > description to "Data for 01.01.06-02.01.06", I want lblMyLabel to
>> > update
>> > as
>> > well.
>> >
>> > Is that possible?
>> >
>> > Thanks,
>> > matt

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I create pivot table with just one label column? Mike Microsoft Excel Programming 0 25th Jul 2008 06:13 PM
Changing label description of removal unit =?Utf-8?B?SkxB?= Windows XP Hardware 3 22nd Nov 2006 08:12 AM
Changing Calendar Label Description and Color =?Utf-8?B?SmFtZXMgRmVsZGVy?= Microsoft Outlook Calendar 1 25th Jul 2006 02:28 PM
Making label caption = table field description SAC Microsoft Access Form Coding 12 14th Jul 2005 04:37 AM
Description pop up for a label or control on an access form =?Utf-8?B?amJlY2syMDEw?= Microsoft Access Database Table Design 4 9th Feb 2005 09:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 AM.