Solved

access report and macro issue

Posted on 2011-02-28
6
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

615 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