Results 1 to 3 of 3
  1. #1
    ksmith is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    59

    Using a Labels Caption Programmatically

    Thanks in advance for any help,
    I have modified one of Access 2007 INSIDE OUT calendar forms to display some of my data in a Project Tracking Application that I am writing. It displays the Project Name on the calendar form in the Month and Day that the project is due. The form works great. The problem is now The Boss wants to be able to double-click on a Calendar day and display more detailed information about the project that is due on that date. There can be many projects due on the same calendar date. In the calendar form the day of the month is written to a label, and shows up in the labels caption, and the data (if any) is written to a text box. What I am attempting to do is build a variable that has the same property as the calendar DATE that was double-clicked.
    For example; If two projects are due 10/22/2010 you would double-click on that date on the calendar form. The code would ultimately filter a query and display those two items, via another form.


    The main problem that I am having is getting the VALUE of the LABEL CAPTION into a format that I can use. How do you ‘extract’ a labels caption?
    Can anyone think of a better way to do this?

    How do you store the extracted information to use in the programs next step?

    Thanks,
    KSmith
    Last edited by ksmith; 10-12-2010 at 01:35 PM. Reason: Refine question

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by ksmith View Post
    How do you ‘extract’ a labels caption?
    you reference it:
    Code:
    forms(form).controls(labe.).caption
    labels don't have values.

    I believe the caption returns a string.

  3. #3
    ksmith is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    59
    Thanks for the speedy reply. I still can't seem to get it to work.

    Thanks Anyway,
    KSmith

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dynamic Report Caption
    By Crypto in forum Reports
    Replies: 3
    Last Post: 11-17-2010, 03:17 PM
  2. Set Label.Caption to field of recordsource
    By ngruson in forum Forms
    Replies: 1
    Last Post: 08-11-2010, 09:59 AM
  3. Replies: 1
    Last Post: 03-24-2010, 02:25 PM
  4. Caption Property & Queries
    By jhrBanker in forum Queries
    Replies: 3
    Last Post: 08-21-2009, 02:28 AM
  5. What I am doing wrong? (caption of report)
    By swampdonkey in forum Reports
    Replies: 0
    Last Post: 12-07-2006, 11:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums