UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Change Location Of Controls On Reports Based On A Number, Access 2013    
 
   
DillyDally
post Apr 6 2020, 06:43 PM
Post#1



Posts: 11
Joined: 1-September 15



Hello all, I hope you are all healthy! I am staying busy by organizing my many yards of fabric. I created an ACCESS db to help with that process. I will eventually print out the report on cardstock and staple a swatch/sample of each fabric on the pages. I can fit all my information on a page such that three records will show up. I have attached a pdf to show a printed page of the report.
Because each page will eventually go into a physical binder, I am trying to cut down on bulk by moving the swatch section to three different places on each page. A different place for each record on a page.

This necessitates moving a few of the controls around. I can't figure out a way to sort the records so they show up in that order. When you look at the pdf, you will see that it is just repeating each record on the page because I just duplicated the controls and moved them around for the sake of the example.

I used to be an old hand at access, but am rusty. Any ideas? Thanks so much in advance.

Attached File  t_fabric1.pdf ( 39.54K )Number of downloads: 7


Dilly Dally

BTW, the fabrics are grouped by the box/bag number they are in.
This post has been edited by DillyDally: Apr 6 2020, 06:44 PM
Go to the top of the page
 
projecttoday
post Apr 6 2020, 07:12 PM
Post#2


UtterAccess VIP
Posts: 12,172
Joined: 10-February 04
From: South Charleston, WV


You're not being clear. Why do you want to scramble around the controls on a report?

--------------------
Robert Crouser
Go to the top of the page
 
June7
post Apr 6 2020, 08:17 PM
Post#3



Posts: 1,400
Joined: 25-January 16
From: The Great Land


OP wants to move around controls so as to move the 'blank' space for attaching fabric swatch so swatches are staggered on page and not all on same side. Some will be right side, some left, some center. Supposedly that would make thickness of page stack less and more 'balanced'.

Programmatically setting control properties on report would be done with Format event of section controls are located in.

This post has been edited by June7: Apr 6 2020, 08:58 PM

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
 
projecttoday
post Apr 6 2020, 09:01 PM
Post#4


UtterAccess VIP
Posts: 12,172
Joined: 10-February 04
From: South Charleston, WV


I see. Maybe you could loop through all the controls and alternately add or subtract a constant value in the loop to the .Left property. That would shift the whole thing.

--------------------
Robert Crouser
Go to the top of the page
 
June7
post Apr 6 2020, 10:20 PM
Post#5



Posts: 1,400
Joined: 25-January 16
From: The Great Land


Here's a start. Add 2 textboxes to report.

First textbox has ControlSource of: =1
Set RunningSum to OverAll

Second textbox has ControlSource of: =[textbox1] Mod 3

Code sample from test in my database. Text83 is second textbox
CODE
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.Text83
    Case 0
        'code to move right
        Me.Age.Left = 8000
    Case 1
        'code to center
        Me.Age.Left = 6000
    Case 2
        'code to move left
        Me.Age.Left = 4000
End Select
End Sub

Left position is set in TWIPS. 1 inch = 1440 TWIPS.
Format event executes only in PrintPreview or direct to printer, not ReportView.


This post has been edited by June7: Apr 6 2020, 10:22 PM

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
 
DillyDally
post Apr 7 2020, 12:38 PM
Post#6



Posts: 11
Joined: 1-September 15



Thank you June 7. It may be beyond my coding capabilities, but I really appreciate you giving me a starting point! Thanks to all who responded! Dilly.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    27th May 2020 - 08:06 AM