Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

access report and macro issue

Posted on 2011-02-28
6
Medium Priority
?
290 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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 …

877 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