Results 1 to 5 of 5
  1. #1
    Casey Sanders is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    37

    Eliminate Space from Hidden Text Box using CanShrink

    I have looked everywhere and can find little information to get this done. Basically, I am setting up a database for a convertible top manufacturer where there are thousands of product codes. I have everything on the tables and forms pretty much working the way they need to and now I'm trying to set up a report to print a catalog. I group them by make, then model, then sort them by year (displaying all the items available for that make/model within that particular year range). This all looks great. The problem is that altogether there are about 30 different types of materials that each top can be made from, but only 5 or 6 for each make/model. For example, a top for a Ford Mustang may have options A, B, C, D, E...A Chevy Camaro may have options F, G, H, I, J....then something like a Mini Cooper may have options B, D, F, H, I, T.... so I have them all laid out in a row with the prices for that material below (in design view) like this:

    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
    1 2 1 4 3 5 3 4 1 2 4 5 1 3 2 2 1 2 3 4 1 2 4 2 2 3

    I have it set (using CanShrink) so that all of the options that are not available for that make/model do not show, but it leaves the blank space where it would normally be...Needless to say, this is WAY too wide for a single page print and ends up looking something like this for the Mini Cooper example above:

    B D F H I T
    2 4 5 4 1 4

    ...and this is what I would like it to look like:

    B D F H I T
    2 4 5 4 1 4

    ...eliminating the space between and consolidating to fit on one line on the same page..

    ***Please see the attachment for an actual screenshot***

    I found this article from Microsoft that describes pretty much what I'm trying to do, but it is a generalization and goes into VB coding (which I'm not very educated on):
    http://support.microsoft.com/kb/299011



    Any help is greatly appreciated!!!!
    Attached Thumbnails Attached Thumbnails db_prices_spacing.jpg  

  2. #2
    Casey Sanders is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    37
    I photoshopped this screenshot to show exactly how I'd like it to look....hope this helps:
    Attached Thumbnails Attached Thumbnails db_prices_spacing_fixed.jpg  

  3. #3
    Casey Sanders is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    37
    ...here is another screenshot I took using some dummy values just to show how the data runs off of the page....
    Attached Thumbnails Attached Thumbnails db_prices_spacing2.jpg  

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The article concerns vertical white space, not horizontal. Managing horizontal white space is at best very difficult and at worst impossible. Will be interested if you find a way.

    Related/duplicate threads
    https://www.accessforums.net/reports...int-31954.html
    https://www.accessforums.net/reports...0-a-31936.html
    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.

  5. #5
    Casey Sanders is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    37
    I was able to put all of the price values into a subreport and place them in the same spot as the images above.... then I included some code to check if the control is null...and if null to set width to 0 and visible to false...it runs great at first using the code below, but once a particular control is set to 0 width and false visibility, it doesn't show up on any records after that...and if refreshed disappears from the first pages as well....so what I need to figure out is how to get the subreport to keep different values (which ones are visible) for each product.... Perhaps there is a way to create a query or something to do this??

    ...here is the code I'm using to accomplish what I described:

    Code:
    If IsNull(Me.sbrpt_Product_Prices.Report.PP_SS_B_W) Then
    Me.sbrpt_Product_Prices.Report.PP_SS_B_W.Width = 0
    Me.sbrpt_Product_Prices.Report.PP_SS_B_W.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_PP_SS_B_W.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_PP_SS_B_W.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.PP_SS_CLR) Then
    Me.sbrpt_Product_Prices.Report.PP_SS_CLR.Width = 0
    Me.sbrpt_Product_Prices.Report.PP_SS_CLR.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_PP_SS_CLR.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_PP_SS_CLR.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.SS_SP_CLR) Then
    Me.sbrpt_Product_Prices.Report.SS_SP_CLR.Width = 0
    Me.sbrpt_Product_Prices.Report.SS_SP_CLR.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_SS_SP_CLR.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_SS_SP_CLR.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.PP_SP_CLR) Then
    Me.sbrpt_Product_Prices.Report.PP_SP_CLR.Width = 0
    Me.sbrpt_Product_Prices.Report.PP_SP_CLR.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_PP_SP_CLR.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_PP_SP_CLR.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.SF_SR) Then
    Me.sbrpt_Product_Prices.Report.SF_SR.Width = 0
    Me.sbrpt_Product_Prices.Report.SF_SR.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_SF_SR.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_SF_SR.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.ET_ES) Then
    Me.sbrpt_Product_Prices.Report.ET_ES.Width = 0
    Me.sbrpt_Product_Prices.Report.ET_ES.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_ET_ES.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_ET_ES.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.SG_TW_RP) Then
    Me.sbrpt_Product_Prices.Report.SG_TW_RP.Width = 0
    Me.sbrpt_Product_Prices.Report.SG_TW_RP.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_SG_TW_RP.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_SG_TW_RP.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.SG) Then
    Me.sbrpt_Product_Prices.Report.SG.Width = 0
    Me.sbrpt_Product_Prices.Report.SG.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_SG.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_SG.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.GR) Then
    Me.sbrpt_Product_Prices.Report.GR.Width = 0
    Me.sbrpt_Product_Prices.Report.GR.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_GR.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_GR.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.RO) Then
    Me.sbrpt_Product_Prices.Report.RO.Width = 0
    Me.sbrpt_Product_Prices.Report.RO.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_RO.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_RO.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.A5) Then
    Me.sbrpt_Product_Prices.Report.A5.Width = 0
    Me.sbrpt_Product_Prices.Report.A5.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_A5.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_A5.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.A5A) Then
    Me.sbrpt_Product_Prices.Report.A5A.Width = 0
    Me.sbrpt_Product_Prices.Report.A5A.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_A5A.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_A5A.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.CO_CG) Then
    Me.sbrpt_Product_Prices.Report.CO_CG.Width = 0
    Me.sbrpt_Product_Prices.Report.CO_CG.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_CO_CG.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_CO_CG.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.EV_BS) Then
    Me.sbrpt_Product_Prices.Report.EV_BS.Width = 0
    Me.sbrpt_Product_Prices.Report.EV_BS.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_EV_BS.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_EV_BS.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.CAB) Then
    Me.sbrpt_Product_Prices.Report.CAB.Width = 0
    Me.sbrpt_Product_Prices.Report.CAB.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_CAB.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_CAB.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.CR_B_W) Then
    Me.sbrpt_Product_Prices.Report.CR_B_W.Width = 0
    Me.sbrpt_Product_Prices.Report.CR_B_W.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_CR_B_W.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_CR_B_W.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.TF_JX_LM) Then
    Me.sbrpt_Product_Prices.Report.TF_JX_LM.Width = 0
    Me.sbrpt_Product_Prices.Report.TF_JX_LM.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_TF_JX_LM.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_TF_JX_LM.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.MC) Then
    Me.sbrpt_Product_Prices.Report.MC.Width = 0
    Me.sbrpt_Product_Prices.Report.MC.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_MC.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_MC.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.TWV) Then
    Me.sbrpt_Product_Prices.Report.TWV.Width = 0
    Me.sbrpt_Product_Prices.Report.TWV.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_TWV.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_TWV.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.LVNT_BK) Then
    Me.sbrpt_Product_Prices.Report.LVNT_BK.Width = 0
    Me.sbrpt_Product_Prices.Report.LVNT_BK.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_LVNT_BK.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_LVNT_BK.Visible = False
    End If
    
    
    If IsNull(Me.sbrpt_Product_Prices.Report.MISC) Then
    Me.sbrpt_Product_Prices.Report.MISC.Width = 0
    Me.sbrpt_Product_Prices.Report.MISC.Visible = False
    Me.sbrpt_Product_Prices.Report.lbl_MISC.Width = 0
    Me.sbrpt_Product_Prices.Report.lbl_MISC.Visible = False
    End If

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

Similar Threads

  1. Replies: 4
    Last Post: 09-19-2012, 08:44 AM
  2. How to eliminate the text after and before the dash
    By Jerseynjphillypa in forum Queries
    Replies: 1
    Last Post: 06-15-2012, 10:58 AM
  3. Space between two text boxes
    By ashbear in forum Reports
    Replies: 3
    Last Post: 08-17-2011, 05:02 PM
  4. Replies: 0
    Last Post: 01-18-2011, 07:09 AM
  5. Eliminate dead code
    By thekruser in forum Programming
    Replies: 7
    Last Post: 09-15-2010, 09:52 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