• Error Messages (Windows 98/Office 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Error Messages (Windows 98/Office 2000)

    Author
    Topic
    #422812

    When ever I design a label report I usually get the error message:-

    “Some data may not be displayed
    There is not enough horizontal space on the page for the number and column spacing you specified.”

    I simply click OK and it always prints perfectly satisfactorily. However I am now having a purge on any error message that appears and I am sure that there is a way to trap this one.

    Does anyone know what it is? Thanks in anticipation

    Michael Peak
    Morecambe, England

    Viewing 0 reply threads
    Author
    Replies
    • #965484

      Open the report in design view.
      Try to drag the right edge of the report to the left as far as possible.
      Close and save the report, and see if the error message has gone.
      If not, decrease the right margin a bit in File | Page Setup.

      • #965524

        Hi Hans,

        Thanks for the reply. I’ve done what you suggest many times in the past and it works with all my reports except labels, which give this message every time. I think its to do with the size of label I use.

        I can live with it, but I was wondering if there was a way of simply trapping that error message, rather like the way you can trap it if there is no data with :-

        Private Sub Report_NoData(Cancel As Integer)
        MsgBox “There are no comments that match. Canceling report…”
        Cancel = -1
        End Sub

        Thanks for all your help

        Michael

        • #965528

          to get rid of the error message entirely would involve a lot of fiddling with the column settings of the label report, it may not be worth while to spend a lot of time on it.

          If you open the report in code, you can suppress the error message like this:

          DoCmd.SetWarnings False
          DoCmd.OpenReport “rptLabels”, acViewPreview
          DoCmd.SetWarnings True

          • #965612

            Thanks Hans,

            Er just one tiny point I know how to do a report in code from a button on a form – this one for example is the code for a button on a form that prints an envelope for just that record. So I can see exactly what I would have to do if I wanted the button to print labels

            Private Sub Print_Env_Click()
            On Error GoTo Exit_Print_Env_Click

            DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
            DoCmd.OpenReport “DL Envelopes”, acPreview, , “[Refno] = ” & [RefNo]

            Exit_Print_Env_Click:
            Exit Sub

            End Sub

            In this case I want it to print from the switchboard, so I realise that I would tell the switchboard manager that I want to run code rather than a report. I can do that OK, but my problem is I’m not sure where to put the code. Do I have to start a new module? If I do could you just start me off in the right direction of how to do that or at least point me to a post that might help.

            This is the point were I realise my limitations I cam modify existing code, but starting from scratch on a completely new bit of code is a different matter.

            Thanks again

            Michael

            • #965618

              To run code from the switchboard, you must create a standard module (i.e. click New in the Modules section of the database window, or select Insert | Module in the Visual Basic Editor), and create a function or procedure without arguments, i.e.

              Public Function Test()

              End Function

              or

              Public Sub Test()

              End Sub

              You can then specify the name of the function/procedure in the Switchboard Manager as argument for the Run Code command.

            • #965679

              Thanks Hans

              I understand what you mean – sorry if it sounds so basic

              Michael

            • #965685

              No problem – we’ve all had to learn how to create code.

    Viewing 0 reply threads
    Reply To: Error Messages (Windows 98/Office 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: