Orange Coast Database Forums

Post Info TOPIC: Access Reports & Forms


Directeur

Status: Offline
Posts: 42
Date:
Access Reports & Forms


Thread for questions and discussion related to Microsoft Access Reports and Forms. From time to time we will post student questions here with a "Q:".

-- Edited by danhdurso at 03:34, 2008-02-14

__________________


Directeur

Status: Offline
Posts: 42
Date:
Printing 0's in a report when there is no data


Q: How do you print a 0 in a report summary column when there are NO records? I get #error.

A: One way is to use syntax similar to the following in the control source for the summary field. It first tests if the report has an empty record source or no. If it does it prints a 0. Otherwise, if there is data, it takes the sum (or other aggregate function).

=IIf([HasData]=0,0,Sum([qty]))

HTH,

--Dan

-- Edited by danhdurso at 03:35, 2008-02-14

-- Edited by danhdurso at 05:30, 2008-02-14

__________________
Anonymous

Date:
Spell Checking Text Entries on a Form


Q: Can you run the spell checker automatically after a user enters text into a text box or memo field?

__________________


Directeur

Status: Offline
Posts: 42
Date:
RE: Spell checking in an Access Form


Yes, here is the code to do it. I got it from databasedev.co.uk and modified it for our factory2000 sample case. It will spell check a comments field I added to the labor tickets. It uses the RunCommand method of DoCmd.

Private Sub memComments_AfterUpdate()
'If the comments field contains data run the
'Spell Checker after data is entered.
    If Len(Me!memComments & "") > 0 Then
        DoCmd.RunCommand acCmdSpelling
            Else
        Exit Sub
    End If
End Sub

I will post a sample database to our sample database collection later. I will also cross post this to the Access VBA thread.

--Dan

__________________
Anonymous

Date:
Alterating Report Line Colors


Here is the code to print report lines in alternating colors like the old greenbar reports. I got it from Blue Claw Database Design. Obviously a nice touch if you have time would be to put it in a library module. This one alternates between light grey and the default.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Detail.BackColor = 16777215 Then
Me.Detail.BackColor = 12632256
Else
Me.Detail.BackColor = 16777215
End If
End Sub


__________________


Directeur

Status: Offline
Posts: 42
Date:
MS Access Reports Google Group


FYI here is the link to the Google group on MS Access Reports...

http://groups.google.com/group/microsoft.public.access.reports/topics?hl=en&lnk=sg

-- Edited by danhdurso at 23:44, 2008-05-12

__________________


Directeur

Status: Offline
Posts: 42
Date:
Setting Report Groups Dynamically


Here is a link to a tip on Allen Browne's site on how to do this...

http://allenbrowne.com/ser-33.html

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us
Members Login
Username 
 
Password 
    Remember Me  


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard