Results 1 to 7 of 7
  1. #1
    wildthingcg is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    20

    Report is cross printing

    I hope i can explain my problem concisely without having to be too wordy.



    I have a form where Members select Jobs to be printed out to a Report.

    1. Job(s) is/are selected and written to a table.
    2. Member exits the form and returns to the Main Menu.
    3. When the Member logs out from the Main Menu if there are Jobs in the table a Report is generated and printed.

    A problem occurs when two Members log out at the same time, in that the Jobs for each of the Members is combined to one Report, rather than a separate Report for each Member. Is there some way to make sure these Reports queue separately in my code using the MemberID or somehow set a delay for the Report when the Member logs out?

    I hope this makes sense. Thank you

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Sounds like this is not a split database. If you want to allow multiple users then need to split the database.
    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.

  3. #3
    wildthingcg is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    20
    The DB is split. Tables in BE everything else in FE.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    What actions are involved in 'logout'? Run the report before the logout actions. Show the logout procedure code.
    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
    wildthingcg is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    20
    Here is the code:

    Private Sub Btn_PrintExitLogOut_Click()
    Dim Response As Integer

    On Error GoTo ErrorHandler

    DoCmd.OpenForm "WorkingListSub"
    If Forms![WorkingListSub]![JobCardNbr] > 1 Then

    DoCmd.OpenQuery "Members_Jobs_Save", acViewNormal, acEdit
    DoCmd.RunCommand acCmdSelectAllRecords
    DoCmd.RunCommand acCmdCopy
    DoCmd.OpenTable "MembersJobs", acViewNormal, acEdit
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdPasteAppend
    DoCmd.SetWarnings True
    ClearClipboard
    DoCmd.Close acQuery, "Members_Jobs_Save"
    DoCmd.Close acTable, "MembersJobs"
    DoCmd.OpenReport "Jobs_Print_Jobs", acNormal
    DoCmd.OpenTable "WorkingList", acViewNormal, acEdit
    DoCmd.RunCommand acCmdSelectAllRecords
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdDelete
    DoCmd.SetWarnings True
    DoCmd.Close acTable, "WorkingList"

    Else

    Call MsgBox("You Had No Jobs on Your List", vbExclamation Or vbDefaultButton1, "R.O.S.")

    End If

    DoCmd.Close acForm, "Members_AllJobs"
    DoCmd.Close acForm, "WorkingListSub"
    DoCmd.Close acForm, "MainMenu_Members"
    DoCmd.OpenForm "FrontPage"

    ExitErrorHandler:
    Exit Sub

    ErrorHandler:
    CodeErrors.PErrorHandler

    Response = acDataErrContinue
    Resume ExitErrorHandler

    End Sub


    Thanks, Cheryl

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If multiple users (multiple open frontends) are writing (copy/paste) records to the 'jobs' table in the backend then of course all records are viewed by all users. This 'jobs' table sounds like a 'temp' table (records are purged at end of process). Temp tables need to be in the front end so that users activity will not conflict.
    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.

  7. #7
    wildthingcg is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Aug 2011
    Posts
    20
    Yes, it is a Temp table. I will move it to FE. Thanks for your help!

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

Similar Threads

  1. Printing report
    By undee69 in forum Forms
    Replies: 1
    Last Post: 06-26-2012, 08:10 PM
  2. Report printing
    By Andrevw in forum Reports
    Replies: 1
    Last Post: 01-16-2011, 06:08 PM
  3. Custom Report Printing
    By robocopfl in forum Reports
    Replies: 3
    Last Post: 06-04-2010, 12:23 PM
  4. Report Printing
    By newtoAccess in forum Reports
    Replies: 5
    Last Post: 12-02-2009, 07:46 PM
  5. Adding rows on cross-tab query report
    By KahluaFawn in forum Reports
    Replies: 2
    Last Post: 02-18-2009, 10:09 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