Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Unanswered: Need help on Report

    Hello All:

    I am newbie here. i just know some basic access and not know much about coding. I just take over a access 07 database and need to do some modifications.
    There is a form that i enter the record number it will generate a subform that shows all items that belongs to that specific record. The subform has check box for each item that i want to print a report for that item. I can check one or check all the box. The problem is that either i chack one or more than one item, the report just print Only one item. Please help me to solve the problem. Here is the code of the subform:

    Attach is the image of the report in design.

    Thanks in Advance.



    Option Compare Database
    Option Explicit

    Private Sub butClose_Click()

    DoCmd.Close acForm, "frmSearchList"

    End Sub

    Private Sub butContinue_Click()

    forms!frmSearchList.Requery
    Dim stQueryName1 As String
    Dim varAssoc As Variant
    varAssoc = DLookup("[RecordID]", "tblPropertySrch", "[PickProp]=Yes")
    If IsNull(varAssoc) Then ' If there are no items picked then go to dialog form
    DoCmd.Close
    Else
    forms!frmSearchList.Requery
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qryDelNonPropSrch" ' Run query and del picked items with no check
    DoCmd.SetWarnings True
    End If
    DoCmd.Close acForm, "frmSearchList"
    DoCmd.OpenReport "rptNoticeOfIntentLetter", acViewPreview, , gstrCriteria

    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qryDelSearchTable" ' Delete all old documents from search table
    DoCmd.SetWarnings True

    'DoCmd****nCommand acCmdPrint
    'DoCmd.PrintOut acPrintAll, 1, , , intNumPrints

    End Sub

    Private Sub butContinue_GotFocus()
    Image65.Visible = False
    End Sub

    Private Sub butContinue_LostFocus()
    Image65.Visible = True
    End Sub

    Private Sub butContinue_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Image65.Visible = True Then
    Image65.Visible = False
    End If
    End Sub

    Private Sub butDeSelAll_Click()
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qryPropListUpdNo" ' Run query and del picked items with no check
    DoCmd.SetWarnings True
    forms!frmSearchList.Requery
    End Sub

    Private Sub butDeSelAll_GotFocus()
    imgSelAll.Visible = False
    End Sub

    Private Sub butDeSelAll_LostFocus()
    imgSelAll.Visible = True
    End Sub

    Private Sub butDeSelAll_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If imgSelAll.Visible = True Then
    imgSelAll.Visible = False
    End If
    End Sub

    Private Sub butSelectAll_Click()
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qryPropListUpdYes" ' Run query and del picked items with no check
    DoCmd.SetWarnings True
    forms!frmSearchList.Requery
    End Sub

    Private Sub butSelectAll_GotFocus()
    ImageDeselAll.Visible = False
    End Sub

    Private Sub butSelectAll_LostFocus()
    ImageDeselAll.Visible = True
    End Sub

    Private Sub butSelectAll_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If ImageDeselAll.Visible = True Then
    ImageDeselAll.Visible = False
    End If
    End Sub

    Private Sub Form_Current()

    End Sub

    Private Sub Form_Load()
    #If ezResizeForm Then
    DoCmd.MoveSize 0, 0 'locate this window at top/left of screen for sizing
    SizeForm Me, GetPref("Form Size Adjustment")
    #End If

    End Sub

    Private Sub butClose_GotFocus()
    Image67.SpecialEffect = 2
    End Sub

    Private Sub butClose_LostFocus()
    Image67.SpecialEffect = 1
    End Sub

    Private Sub butClose_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Image67.SpecialEffect = 1 Then
    Image67.SpecialEffect = 2
    End If
    End Sub

    Private Sub FormFooter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Image67.SpecialEffect = 2 Then
    Image67.SpecialEffect = 1
    End If
    If Image65.Visible = False Then
    Image65.Visible = True
    End If
    If ImageDeselAll.Visible = False Then
    ImageDeselAll.Visible = True
    End If
    If imgSelAll.Visible = False Then
    imgSelAll.Visible = True
    End If


    End Sub
    Attached Thumbnails Attached Thumbnails Report.jpg  
    Last edited by tttt; 03-30-12 at 15:34.

  2. #2
    Join Date
    Mar 2012
    Posts
    3
    Any help and input?

Posting Permissions

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