Results 1 to 8 of 8
  1. #1
    DSTR3 is offline Novice
    Windows XP Access 2002
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22

    Access 2010 Problem

    I have this code that worked fine in Access 2002.
    Now that I am using the database in Access 2010 the form "frmReportDates" isn't becoming visible again...am I missing soemthing or is this a bug?
    Thanks
    DS

    Private Sub ImageClose_Click()
    DoCmd.Close acReport, "rptFXCustomersActive"
    DoCmd.Close acForm, "frmRptPrint"
    Forms!frmReportDates.Visible = True
    End Sub

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is this code in the frmRptPrint form?

  3. #3
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22
    Yes it is. I also tried adding another command button to make the form visible but it doesn't work. If I run an open form report the form comes up that its open but not visible.
    Thanks
    DS

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It should work. I take it the frmReportDates form is the one that opened the current form. How about posting the code in that form that set itself invisible and opened this form?

  5. #5
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22
    Hello, sorry for the delay. Went away for Thanksgiving and there was any internet service where I was. The problem seems to be on the Close property of the report.

    Private Sub Report_Close()
    If Report.HasData = False Then
    Exit Sub
    Else
    Reports!rptFXEmployeeInActiveContact.Visible = False
    DoCmd.OpenForm "frmRptPrint"
    Forms!frmRptPrint!TxtReportName = "rptFXEmployeeInActiveContact"
    Forms!frmRptPrint!TxtReportID = Forms!frmReportDates!TxtReportID
    End If
    End Sub

    If I rem out the Reports!rptFXEmployeeInActiveContact.Visible=False that fixes the problem, however why would this work in Access 2002 and not in 2010? Do I need to move that line or do I not need it? Thanks
    DS

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So in the rptFXEmployeeInActiveContact report Close event you are setting the Report Visible property to False? Why? I thought you wanted to close the report! How many forms do you have open at the same time? Why not let each Form and Report take care of themselves instead of manhandling them from another Form/Report?

  7. #7
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22
    Good question. Not quite sure why I have it set to false. I have a lot of information that I bump from one form to the next, also once the user is in the program I have them locked in, thank you for your help.
    DS

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If it is the rptFXEmployeeInActiveContact report you are closing then commenting out the line is just fine and the line is absolutely unnecessary and can be deleted.

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

Similar Threads

  1. Access 2010
    By Desstro in forum Access
    Replies: 8
    Last Post: 01-19-2016, 04:09 PM
  2. 2002 to 2010 Problem
    By DSTR3 in forum Access
    Replies: 4
    Last Post: 11-16-2010, 10:23 PM
  3. Access 2007 to Access 2010 Problem
    By evalmedi in forum Access
    Replies: 1
    Last Post: 10-24-2010, 02:56 PM
  4. .mdb under Access 2010
    By mwolfod in forum Access
    Replies: 4
    Last Post: 10-14-2010, 09:50 PM
  5. Just got Access 2010-run application problem
    By lycialive in forum Forms
    Replies: 0
    Last Post: 07-09-2010, 08:17 PM

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