Go Back   DeveloperBarn Forums > Databases > Microsoft Access

Sponsored Links

Discuss "Page Number Manipulation" in the Microsoft Access forum.

Microsoft Access - Microsoft Access is a database for small to medium applications. Learn tips and tricks and best database practices here.


Closed Thread « Previous Thread | Next Thread »  
 
LinkBack Thread Tools Display Modes
  #1  
Old March 19th, 2008, 12:15 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 93
Thanks: 6
Thanked 23 Times in 18 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default Page Number Manipulation

2 Reports

First Report "Inspection"

Page Numbers Start at 8, 9, 10 etc
Report is grouped by Operation Number,.. I.e. "201-1 = Page 8,.. 202-1 = Page 9. Note the main group numbers "201" and "202" So to make things easier to understand,.. the -1 is standard and not related to the 2nd report.

2nd Report i have Findings,..

Report is grouped by Finding Number,..

I.e. "301-1 should= Page 8a,.. 301-2 should= Page 8b ,.. 301-3 should= Page 8c Note the relationship between the Inspection and Finding Number is +100. in this case they are related to 201-1 "Page 8" of the Inspection Report

302-1 and 302-2, 302-3 are related to the 202 group,.. again as in all cases the relationship between the Inspection and Finding Number is +100 as before these will be page 9a and page 9b, page 9c,..etc

So in summary what i need.

1st - The findings groups need to relate to the inSpection page numbers on the first report,.
2nd - Finding 301-1 and 301-2, 301-3 should go 8a 8b 8c,.. and when it gets to 302-1 "on the same report" it Goes Page 9a 9b 9c,...

Hope this makes sense,.. i don't expect an answer on this one,.. but if you could share some logic,.. maybe i can "hack" it some how
__________________
If i helped you, make me famous by clicking the
Sponsored Links
  #2  
Old March 19th, 2008, 12:30 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 93
Thanks: 6
Thanked 23 Times in 18 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default

Long story short inspection 201-1 "disregard the -1" can have multiple findings,..

And the page number on the findings report must be the same as the inspection its related to,.. the multiple findings must be paged with a, b c etc...

Maybe i'll have to somehow work the page numbers out in query.

Last edited by AOG123; March 19th, 2008 at 01:39 PM.
  #3  
Old March 19th, 2008, 01:09 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

For the value of the Inspection I would do something like:
Code:
="Page " & Val(Mid([yourInspString],2,2))+7
And then for Findings, I would do:
Code:
="Page " & Val(Mid([yourfindingstring],2,2))+7 & chr(val(Mid([yourfindingstring], instr([yourfindingstring], "-")+1))+64)

Comments on this post
BLaaaaaaaaaarche agrees: w00t w00t!
  #4  
Old March 19th, 2008, 01:34 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 93
Thanks: 6
Thanked 23 Times in 18 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default

Only needed the second part,..

, ... well that appears to have worked,.. need to test it on a few more numbers "but" real good

thanks sbenj
  #5  
Old March 19th, 2008, 01:36 PM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

you're welcome
  #6  
Old March 20th, 2008, 12:21 AM
sbenj69's Avatar
Moderator

 
Join Date: Mar 2008
Posts: 84
Thanks: 20
Thanked 24 Times in 19 Posts
Rep Power: 1
sbenj69 is on a distinguished road

Awards Showcase
Microsoft Windows Microsoft Access 
Total Awards: 2

Default

Code:
="Page " & Val(Mid([yourfindingstring],2,2))+7 & chr(val(Mid([yourfindingstring], instr([yourfindingstring], "-")+1))+64)
Let's break it down:

To break it down, if [yourfindingstring]= "202-1"

The first part would be: "Page " & Val(Mid("202-1",2,2))+7 & chr(val(Mid("202-1", instr("202-1", "-")+1))+64)

The second part: "Page " & Val("02")+7 & chr(val(mid("202-1", 4+1))+64)

The third part: "Page " & 9 & chr(val(mid("202-1",5))+64)

The fourth part: "Page " & 9 & chr(val("1")+64)

The fifth part: "Page " & 9 & chr(65)

The sixth part: "Page " & 9 & "A"

The final outpout: "Page 9A"

Last edited by sbenj69; March 20th, 2008 at 01:47 PM.
  #7  
Old March 20th, 2008, 01:38 PM
AOG123's Avatar
Lightning Master

 
Join Date: Mar 2008
Location: Fortress Of Solitude
Posts: 93
Thanks: 6
Thanked 23 Times in 18 Posts
Rep Power: 1
AOG123 is on a distinguished road

Awards Showcase
Microsoft Access 
Total Awards: 1

Default

Nice break down,.. thanks for sharing
Closed Thread

  DeveloperBarn Forums > Databases > Microsoft Access

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
go page to page questionaire app peebman2000 .Net Development 3 April 26th, 2008 04:42 PM


All times are GMT -4. The time now is 03:43 PM.



Content Relevant URLs by vBSEO 3.2.0