Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Mar 2001
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating Caption Property (Access 2002)

    Hello All! I am wondering if there is a way to update the field property caption in a table from values stored in another table.. I have a set of values that I would like to enter into 1 table and then use that table to populate the caption property in table design view for a number of fields in various tables. I have gone through help and it's been no help.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Updating Caption Property (Access 2002)

    Would you give an example of what you are trying to achieve.
    Also why do you wish to do this? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    New Lounger
    Join Date
    Mar 2001
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating Caption Property (Access 2002)

    <P ID="edit" class=small>(Edited by barbl on 13-Nov-02 21:47. )</P>I am running a survey that looks at 20 issues, or attributes. I have a table called xattributes in which I list the attribute descriptions (roughly 10 words for each of 20 attributes) and other info about each attribute like the group they belong in, the order they fall in, etc - 1 row for each attribute so this xattributes table has 20 rows. I then have 3 other tables that each contain different information about these attributes - numerical rankings and comments mostly that are collected during the survey. The fields in these tables that hold info on the attributes are generically named, att1, att2, etc. The 3 other tables are generic to a database structure that I use over and over again as new surveys (with new attributes each survey) are generated. I need to provide the databases to clients and therefore need to have the description of each attribute available in the table design view for each of those 3 tables (I currently type it in 3 times!). Also, I generate a number of reports and its nice to have the caption automatically fill in the attribute description so I don't have to retype it each time. Ultimately I would like to type in the descriptions into the xattributes table and have code or a macro automatically fillin the caption property for each of the attributes in those 3 tables. Whew - that sounds confusing even to me! Let me know if I need to be more clear.... Thanks!

  4. #4
    New Lounger
    Join Date
    Mar 2001
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating Caption Property (Access 2002)

    Thank you so much - this looks like it will work perfectly! I will give it a try.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Updating Caption Property (Access 2002)

    I have attached a text file with some code that you may be able to adapt. The SetCaptions procedure uses a meta information table (its name is in the strMetaData constant) of the following form

    <table border=1><td>FieldName</td><td>Description</td><td>Att1</td><td>Age (years)</td><td>Att2</td><td>Size of household</td><td>Att3</td><td>Number of tv sets</td></table>
    It loops through all tables in the current database and sets the caption property of all fields matching a name in the FieldName column to the corresponding Description.

    The code can be adapted to use another database than the current one, and to loop through a more restricted subset of the tables.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •