Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Create a label that equals a table description

Discussion in 'Information Technology' started by Mattantaliss, Jul 28, 2006.

  1. Mattantaliss

    Mattantaliss
    Expand Collapse
    Guest

    [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
     
  2. Loading...


  3. Jeff Boyce

    Jeff Boyce
    Expand Collapse
    Guest

    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" <Mattantaliss@discussions.microsoft.com> wrote in message
    news:561BA379-DB5E-4705-9D41-56ED3F9CCA7F@microsoft.com...
    > [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
     
  4. Mattantaliss

    Mattantaliss
    Expand Collapse
    Guest

    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" <Mattantaliss@discussions.microsoft.com> wrote in message
    > news:561BA379-DB5E-4705-9D41-56ED3F9CCA7F@microsoft.com...
    > > [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

    >
    >
    >
     
  5. Wolfgang Kais

    Wolfgang Kais
    Expand Collapse
    Guest

    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
     
  6. Jeff Boyce

    Jeff Boyce
    Expand Collapse
    Guest

    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" <Mattantaliss@discussions.microsoft.com> wrote in message
    news:5E663B97-382F-45DD-9EF5-036CCBBF0931@microsoft.com...
    > 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" <Mattantaliss@discussions.microsoft.com> wrote in message
    >> news:561BA379-DB5E-4705-9D41-56ED3F9CCA7F@microsoft.com...
    >> > [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

    >>
    >>
    >>
     

Share This Page