Results 1 to 6 of 6
  1. #1
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49

    rename column header name in subform during run time


    Hi All,

    I want to rename column header name in subform during run time, how I will do this?


    form type = Datasheet

    Regards,
    Selvakumar R

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    I think you need to change the the "Caption" property of the label control that is attached to the control that is used for the column.
    For more help, we will need to know the name of the controls and what you want the header name changed to. Why does this need to be done at runtime?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    We have different module in application, for example column "State" in one module will be "State" and in other module like "Garaging State"/"Predominant State" etc... So based on the condition I need to change its header name during run time. Already I tried with "Caption", it is throwing error. Do you have any other idea how to do this?
    [SubFormName].Form.State.Caption= "Garaging State"
    Thanks,
    Selvakumar R

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Try:
    Me.[SubFormName].Form.LabelName.Caption= "Garaging State"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    selvakumar.arc is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    49
    Thanks alot Bob, it is working.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Quote Originally Posted by selvakumar.arc View Post
    Thanks alot Bob, it is working.
    Good, I'm glad we were able to help Good luck with your project.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. using macro to rename column values in Access
    By coolbear91 in forum Programming
    Replies: 1
    Last Post: 02-20-2013, 11:10 PM
  2. Add a header row to CSV - not column names
    By shank in forum Import/Export Data
    Replies: 10
    Last Post: 09-27-2012, 02:29 PM
  3. Dates as Column Header
    By afvillodres in forum Queries
    Replies: 1
    Last Post: 07-24-2012, 06:04 PM
  4. Fill in form header based on subform
    By VictoriaAlbert in forum Forms
    Replies: 1
    Last Post: 04-21-2011, 01:38 PM
  5. Importing new time for header and update report
    By spamvalley in forum Reports
    Replies: 2
    Last Post: 02-16-2006, 11:23 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