?
Solved

access report and macro issue

Posted on 2011-02-28
6
Medium Priority
?
289 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

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.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

718 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