Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2014
    Location
    canada
    Posts
    4

    Change field location before printing a report


    I'm in access2000. One of my reports has a large image file embedded. Before I print this report I would like to change the location of one of the fields to a predetermined location depending on certain conditions .Because of the size of this report, I would like to use one report rather than have multiple reports with the field in predetermined locations. The size of the database gets too large. How do I code this. I figure i would try the report on open. The conditions I can set but the actual syntax I cant get for moving the field location in the report.I tried fieldname.left= ___ fieldname.top = ___ it wont take inches either. I tried with fieldname
    .movesize left:= x ,top:= y
    end with

    can the field in the report be changed prior to printing? Thanks for any help. Stan

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try code in the Format event of the relevant section.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Jul 2014
    Location
    canada
    Posts
    4
    Thanks for the suggestion. I found out the property values describing location of a particular field say "field1" -top and left were not useful in trying to help relocate field1 . I wanted to have a choice to locate field1 at location1 as described by placing field1 in the report or move field1 to second location called location2. In design view I physically moved field1 to location2. Instead of using the field1.top and field1left values in the property box to describe location2 ,I inserted the following code in the on open event of the report to find the true location2 . msgbox "field1.left=" & " " & field1.left & " " & "field1.top=" & " " & field1.top AND LEFT. I noted the values of left and top as given by the msgbox. I then moved the field1 to the original starting location called location1 and saved the report. I inserted the following code in on open report event with a condition to move field1 to location2. If I wanted to move field1 to location2 I inserted the following code in the on open report event - field1.left = value obtained from msgbox for location2 and similarly field1.top = value seen in msgbox for location2. Now depending on my conditions I could move field1 to location1 or location2.

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

Similar Threads

  1. change file location
    By Mbakker71 in forum Import/Export Data
    Replies: 4
    Last Post: 01-29-2014, 08:17 AM
  2. Change Primary Location of Access Database
    By MichaelWR90 in forum Access
    Replies: 8
    Last Post: 06-03-2013, 09:45 AM
  3. Change date after printing report
    By dutyfree in forum Reports
    Replies: 4
    Last Post: 10-24-2011, 12:55 PM
  4. Attachment file location change
    By gary742 in forum Access
    Replies: 3
    Last Post: 03-22-2011, 12:26 PM
  5. Replies: 0
    Last Post: 03-01-2011, 10:47 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