Solved

access report and macro issue

Posted on 2011-02-28
6
285 Views
Last Modified: 2012-05-11
I have a dbse which i intend to use in a small network.
There is some code behind a report and when it is opened on my computer (access 2007) the code does not operate and the rport doesnt function properly.

But when the report is opened on other client computers it works fine and the code works.

The dbse is in a shared folder. The dbse is written in access 2002.

Access 2007 is on my computer which doesnt open it properly and
access 2002 in on the other computer which is fine.

I have Symantec anti virus on all computers and all are up to date with definitions.

all running xp
0
Comment
Question by:topUKlawyer
  • 3
  • 2
6 Comments
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 34998052
What is the code?  In what way does it not work?  Could this be because macro security is too high on the computer with the problem?
0
 

Author Comment

by:topUKlawyer
ID: 34998750
Hi, see for the probem

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26844766.html

access 2007 does not appear to have the same user defined security "buttons" as previous versions, apparently, tho, that said I have never had this problem before or anything like it.

code to follow
0
 

Author Comment

by:topUKlawyer
ID: 34998770
code in report detail

the dbse is in a "Trusted location"

so should be OK.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
For Each ctl In Me.Section(0).Controls
    ctl.Visible = Not IsNull(ctl)
Next
End Sub

Open in new window

0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 35000070
1. Make sure the Report is being opened explicitly in Print Preview.
(Access 2007 default is Report View, where most VBA code will not run.)

2. I never liked that "reverse logic" code.
;-)
Also, I always like to say Next Something, not just Next.
How about trying something like this:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
For Each ctl In Me.Section(0).Controls
    If IsNull(ctl) then
        ctl.visible=False
    Else
        ctl.visible=True        
Next ctl
End Sub



JeffCoachman
0
 

Author Comment

by:topUKlawyer
ID: 35000352
yay, boag

spot on my friend,

thanks for the code tip as well
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35000802
;-)
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question