Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Single page (2003)

    I created a database for our despatch department some time ago, which works perfectly well. Part of it, is a form which contains delivery note details. A customer has requested that each item is on a seperate delivery note. To enter each item on a seperate form is time consuming. Is there a way of creating the delivery note to print each line on a seperat delivery note. I realise that the data still has to be entered but, having to go in and out of the form each time, takes all the time. We would like to complete all the data entry and then say print delivery notes n to n.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Single page (2003)

    I would create a report to print the delivery notes. You can set the Force New Page property of the Detail section to Before Section, so that each record prints on a separate page.

    You can use text boxes or combo boxes on a form to let the user specify a range of notes to be printed, and use these in the WhereCondition argument of DoCmd.OpenReport.

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Single page (2003)

    Not sure about the second half of your reply

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Single page (2003)

    The idea is that you create a report that, if opened by itself, will display/print all notes. Let's say the report is named rptNotes.

    You want users to be able to print a range of notes. Say that they have a sequence number NoteID.

    On a form, put an unbound text box txtStart and another unbound text box txtEnd.
    Set the Format property for these text boxes to General Number, or to Fixed with 0 Decimal Places.
    Also put a command button cmdReport on the form, with the following On Click event procedure:

    Private Sub cmdReport_Click()
    On Error GoTo ErrHandler

    If IsNull(Me.txtStart) Then
    MsgBox "Please enter a start number", vbExclamation
    Me.txtStart.SetFocus
    Exit Sub
    End If

    If IsNull(Me.txtEnd) Then
    MsgBox "Please enter an end number", vbExclamation
    Me.txtEnd.SetFocus
    Exit Sub
    End If

    DoCmd.OpenReport "rptNotes", acViewPreview, , "NoteID Between " & Me.txtStart & " And " & Me.txtEnd
    Exit Sub

    ErrHandler:
    If Not (Err = 2501) Then
    MsgBox Err.Description, vbExclamation
    End If
    End Sub

    The report will be displayed in print preview mode. If you want to send it directly to the printer, replace acViewPreview with acViewNormal.

  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Single page (2003)

    I get a syntax error 'Syntax error (missing operator) in query expression '(Delivery Note Between 1 and 2)'. I'm trying it out with a table with just 2 deliveries.

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Single page (2003)

    Try it wit square brackets around Delivery Note
    DoCmd.OpenReport "rptNotes", acViewPreview, , "[Delivery Note] Between " & Me.txtStart & " And " & Me.txtEnd
    Francois

  7. #7
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Single page (2003)

    Thanks. That's done the trick. I'm learning a little all the time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •