Results 1 to 2 of 2
  1. #1
    princeofdumph is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Dec 2011
    Posts
    4

    problem with dynamic moving columns in report

    Hi, i am facing a problem in controling movement of my report columns, both labels and their related textboxes in Details section. I am using a code in the OnFormat event of pageheader section which is like this:
    For Column A:


    If Len([ABC] & vbnullstring)=0 Then
    me!ABC_Label.visible = false
    else
    me!ABC_Label.visible = True
    endif

    For next rightside column B:
    If Len([XYZ] & vbnullstring)=0 Then
    me!XYZ_Label.visible = false
    else
    me!XYZ_Label.visible = True
    me!XYZ_Label.Move Left = 567(say)
    me!XYZ.Move Left = 567
    endif
    What I am trying to achieve is that if condition for column A is met and it is hidden(label+textbox), column B label and textbox moves left to occupy the blank space created. I successfuly hide column A, but with Move property, the column B label n textbox goes straight to extreme left of the report overlying on the very first column present there. Maybe I am not getting the Twips setting right. How do i fix this?

    Also I want to apply these column movements dependent on every change in employeeID for the given calender date. What kind of For Loop(if applicable) should I construct? emploeeID is my group header and i want to keep each employee's monthly data datewise on one report page. Experts advice needed here.

  2. #2
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    Try this:

    For next rightside column B:
    If Len([XYZ] & vbnullstring)=0 Then
    me!XYZ_Label.visible = false
    else
    me!XYZ_Label.visible = True
    me!XYZ_Label.Left = 567
    me!XYZ.Left = 567
    endif

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

Similar Threads

  1. Subform with dynamic number of columns
    By modbass in forum Programming
    Replies: 1
    Last Post: 12-15-2011, 03:39 AM
  2. Problem moving database to another computer
    By DB2010MN26 in forum Access
    Replies: 4
    Last Post: 11-22-2011, 04:23 PM
  3. counting columns of table to view in dynamic recordset
    By rivereridanus in forum Programming
    Replies: 3
    Last Post: 07-27-2011, 02:44 PM
  4. Problem with Access 2003 database after moving PCs
    By ValiantSaint in forum Access
    Replies: 2
    Last Post: 06-25-2010, 01:55 AM
  5. Dynamic Query Outer Join Problem
    By mjack003 in forum Queries
    Replies: 0
    Last Post: 07-21-2006, 01:07 PM

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