Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 01-15-2019, 08:03 AM   #1
vsk1975
Newly Registered User
 
Join Date: Mar 2018
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
vsk1975 is on a distinguished road
Post Arranging exam register number data in zigzag order in ms access report

Sir
My access report contains exam register numbers in 4 columns and I would like to arrange it in zigzag order as given below

120321 120322 120323 120324
120328 120327 120326 120325
120329 120330 120331 120332

Please Help

Thanks

vsk1975 is offline   Reply With Quote
Old 01-15-2019, 08:11 AM   #2
Ranman256
Newly Registered User
 
Join Date: Apr 2015
Location: KY,USA
Posts: 3,240
Thanks: 0
Thanked 711 Times in 696 Posts
Ranman256 will become famous soon enough Ranman256 will become famous soon enough
Re: Arranging exam register number data in zigzag order in ms access report

Don't know about zigzag,but in report page setup,
page setup, columns, either:

down, then across,
across, then down (aka zigzag?)
Ranman256 is offline   Reply With Quote
Old 01-15-2019, 08:11 AM   #3
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,550
Thanks: 2
Thanked 2,020 Times in 1,976 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Arranging exam register number data in zigzag order in ms access report

I don't think you can made it without involving some VBA code that set a sort order, then it is not exactly zigzag order, but Ascending for four values then Descending for four values then again Ascending for four values etc.

__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 01-15-2019, 08:29 AM   #4
vsk1975
Newly Registered User
 
Join Date: Mar 2018
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
vsk1975 is on a distinguished road
Re: Arranging exam register number data in zigzag order in ms access report

sir, a single page contains eighty register numbers , it should be arranged like this

first row from left to right
second row from right to left
third row from left to right etc

each row contains 4 register numbers
vsk1975 is offline   Reply With Quote
Old 01-15-2019, 08:35 AM   #5
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,550
Thanks: 2
Thanked 2,020 Times in 1,976 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Arranging exam register number data in zigzag order in ms access report

Quote:
Originally Posted by vsk1975 View Post
..
first row from left to right
second row from right to left
third row from left to right etc

each row contains 4 register numbers
Exactly what I wrote, still I don't think you can made it without involving some VBA code that set a sort order.
Post your database, zip it!
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 01-15-2019, 09:15 AM   #6
vsk1975
Newly Registered User
 
Join Date: Mar 2018
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
vsk1975 is on a distinguished road
Re: Arranging exam register number data in zigzag order in ms access report

sir here is the zipped file . It is a simple db file please give a solution
thanks
Attached Files
File Type: zip registernumbers.zip (14.8 KB, 21 views)
vsk1975 is offline   Reply With Quote
Old 01-15-2019, 10:53 AM   #7
Uncle Gizmo
Nifty Access Guy
 
Uncle Gizmo's Avatar
 
Join Date: Jul 2003
Location: Newbury Berks UK
Posts: 9,683
Thanks: 393
Thanked 814 Times in 777 Posts
Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough
Send a message via Skype™ to Uncle Gizmo
Re: Arranging exam register number data in zigzag order in ms access report

I'm not sure this is the answer you are looking for, but it might provide some inspiration...

http://www.niftyaccess.com/reports-weaving-records/

Sent from my SM-G925F using Tapatalk

__________________
Code:
                 |||||
               @(~^~)@
-------------oOo---U---oOo-------------
|                                     |
|      Uncle Gizmo              |
|                                     |
|                                     |
| Get $20 worth of "Nifty Code"       |
|      
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
| | Ooo | |_________________ooO____( )________| ( ) ) / \ ( (_/ \_)
Uncle Gizmo is offline   Reply With Quote
Old 01-15-2019, 11:24 AM   #8
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 11,728
Thanks: 63
Thanked 1,920 Times in 1,870 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Arranging exam register number data in zigzag order in ms access report

The term you are looking for if I recall correctly is "snaking". I recall doing this with labels.

Here is one link, but I'm sure you can google others and/or a tutorial.
Another link
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by jdraw; 01-15-2019 at 11:53 AM.
jdraw is online now   Reply With Quote
Old 01-15-2019, 11:37 AM   #9
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,177
Thanks: 22
Thanked 311 Times in 302 Posts
MajP will become famous soon enough MajP will become famous soon enough
Re: Arranging exam register number data in zigzag order in ms access report

Quote:
Exactly what I wrote, still I don't think you can made it without involving some VBA code that set a sort order.
Post your database, zip it!
I think that is how I would do it. Add a sort column to the table. Determine you number of columns and number the columns. Then show in a columnar report.
MajP is offline   Reply With Quote
Old 01-15-2019, 11:49 AM   #10
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 11,728
Thanks: 63
Thanked 1,920 Times in 1,870 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: Arranging exam register number data in zigzag order in ms access report

Here's what I get with your data using 4 columns with snaking (across then down). Hope that's what you want.

Attached Images
File Type: png snakedReport4Columns.PNG (49.6 KB, 51 views)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is online now   Reply With Quote
Old 01-15-2019, 12:10 PM   #11
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,177
Thanks: 22
Thanked 311 Times in 302 Posts
MajP will become famous soon enough MajP will become famous soon enough
Re: Arranging exam register number data in zigzag order in ms access report

Add a field sort order to your table and run the code I get the below if I sort by sortorder.

Code:
120321 120322 120323 120324
120328 120327 120326 120325
120329 120330 120331 120332
Code:
Public Sub AddSort(NumberColumns As Integer)
  Dim rs As DAO.Recordset
  Dim strSql As String
  Dim i As Integer
  Dim rowCountDiv As Double
  Dim rowcount As Integer
  Dim direction As Integer
  Dim sortOrder As Integer
  Dim itmInRow As Integer
  Set rs = CurrentDb.OpenRecordset("Select * from table1 order by regno")
  direction = 1  ' 1 forward 0 backward
  Do While Not rs.EOF
    rowCountDiv = (rs.AbsolutePosition) / NumberColumns
    If rowCountDiv = Int(rowCountDiv) Then
      rowcount = rowcount + 1
      itmInRow = 0
      direction = rowcount Mod 2
    End If
    If direction = 1 Then
      sortOrder = rs.AbsolutePosition + 1
    Else
      sortOrder = (rowcount * NumberColumns) - itmInRow
    End If
    Debug.Print rs.AbsolutePosition + 1 & " " & rowcount & " Mod " & rowcount Mod 2 & " " & sortOrder
     itmInRow = itmInRow + 1
     rs.Edit
       rs!sortOrder = sortOrder
     rs.Update
       
     rs.MoveNext
     
  Loop
  
End Sub

Public Sub TestCount()
  AddSort 4
End Sub
MajP is offline   Reply With Quote
The Following User Says Thank You to MajP For This Useful Post:
vsk1975 (01-16-2019)
Old 01-15-2019, 12:18 PM   #12
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,177
Thanks: 22
Thanked 311 Times in 302 Posts
MajP will become famous soon enough MajP will become famous soon enough
Re: Arranging exam register number data in zigzag order in ms access report

Example sort order
Code:
regno	sortOrder
120321	1
120322	2
120323	3
120324	4
120325	8
120326	7
120327	6
120328	5
120329	9
120330	10
120331	11
120332	12
120333	16
120334	15
120335	14
120336	13
120337	17
120338	18
120339	19
120340	20
120341	24
120342	23
120343	22
120344	21
120345	25
120346	26
120347	27
120348	28
120349	32
120350	31
120351	30
120352	29
Attached Images
File Type: jpg zigzag.jpg (70.5 KB, 42 views)

Last edited by MajP; 01-15-2019 at 07:49 PM.
MajP is offline   Reply With Quote
Old 01-16-2019, 08:40 AM   #13
vsk1975
Newly Registered User
 
Join Date: Mar 2018
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
vsk1975 is on a distinguished road
Re: Arranging exam register number data in zigzag order in ms access report

Many Many Thanks Sir
The Given Code Works Perfectly

vsk1975 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arranging Number in Expression aparnag Queries 3 04-19-2010 09:22 AM
Normalizing & Data Arranging mcox05 Theory and practice of database design 4 12-22-2006 09:41 AM
[SOLVED] access to a report in a specify register geck0 Reports 5 02-17-2005 02:21 PM
Order report by number of detail records preggo Reports 1 08-27-2003 11:04 AM
arranging 4 bytes into Long data type rolex Modules & VBA 3 12-03-2002 01:49 AM




All times are GMT -8. The time now is 12:22 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World