Selasa, 24 Mei 2011

RE: [MS_AccessPros] Subform return error

 

Jonathan-

You *might* be able to do it in the Control Source of a text box on the outer
form:

=IIf([Report].[sub report control name].Report.RecordSet.RecordCount = 0,
"Name:_________", "")

Enter the name of the subreport control in place of "sub report control name".

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of jrv2110
Sent: Tuesday, May 24, 2011 10:39 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Subform return error

John,

I might have done something wrong but it did not work.

Let me explain it again.

I am working in a report. The report has the client's information. It has the
client's emails in a subreport. I want to be able to have a custom label apear
on the main report outside the subreport when there is nothing in the subreport
for the emails. There is nothing in the subreport, it has no records to show (no
emails in it). What formula could I use to activate a label so that the client
knows that I am requesting an email from him on the report given he has not
provided one? If he had provided one then nothing will happen because the
subreport for the email will show the email.

Jonathan

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Dear jrv2110 (name?)-
>
> That might be because the field contains a zero-length string. Try this:
>
> IIf(Len([Name] & "") = 0, "Name:____________", "")
>
> By the way, Name is a reserved word in Access. You should not give any field
> that name.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of jrv2110
> Sent: Tuesday, May 24, 2011 10:04 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Subform return error
>
> I have a subreport that has a client's email address(es). I want a formula
that
> will return in the a text box in the main report a note saying the following:
> "Please provide your email:_______________"
>
> I am using a formula in the main report with data on that main report (not on
a
> subform) and it is working great:
> =IIf([NAME] Is Null,"Name:_____________","")
>
> The name of the subreport is: Report.SUBRPT CORREO ELECTRONICO
> The name of the field within the subreport is: CORREO ELECTRONICO
>
> "Is null" is not working because when the Email subreport has nothing in it,
> there is nothing that happens with the formula.
>
>
> Thanks in advance for any advice.
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar