Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2005

Tip: Looking for answers? Try searching our database.

Control value drive text display

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay - 13 Jan 2005 16:13 GMT
I have a control on a report, what I'd like to do is display the text "PAL"
if the content/value of the text/control is equal to -1, if the control's
value is 0, then, show "SFSV"

Is this possible? If it is how does one get it done?

Thanks,
dkalsow - 13 Jan 2005 17:37 GMT
Jay,

You can do this a couple of ways:

1) have a query be the control source for the report.  In the query create a
new field and use the iff function like this:  Newfield:
IIf([sourcefield]=-1,""PAL" ,"SFSV")

2) hide the current field on the report and create a new field and set the
new fields source to: =IIf([sourcefield]=-1,""PAL" ,"SFSV")

3) hide the current field and create a new field then in the format section
of the report write an event procedure that will check the current field and
then set the new field based upon the vale that is in the current field.  
Something like:

if txtcurrentfield = -1 then
txtnewfield="PAL"
else
txtnewfield="SFSV"
end if

Hope this helps.

Dale

> I have a control on a report, what I'd like to do is display the text "PAL"
> if the content/value of the text/control is equal to -1, if the control's
[quoted text clipped - 3 lines]
>
> Thanks,
Jay - 13 Jan 2005 19:39 GMT
Dale:

Thanks, I think that this will work, just fine! Appreciate the assistance!

> Jay,
>
[quoted text clipped - 29 lines]
> >
> > Thanks,
Marshall Barton - 13 Jan 2005 20:24 GMT
>I have a control on a report, what I'd like to do is display the text "PAL"
>if the content/value of the text/control is equal to -1, if the control's
>value is 0, then, show "SFSV"

Another way that does not require any code/expressions is to
set the text box's Format property to a custom format.  In
this case:
    ;"PAL";"SFSV"

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.