Solved

access report and macro issue

Posted on 2011-02-28
6
283 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
Comment Utility
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
Comment Utility
yay, boag

spot on my friend,

thanks for the code tip as well
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
;-)
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now