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 / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Using selction criteria in report field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
xX Longshank Xx - 10 Jan 2008 19:23 GMT
I am currently working on a response log data base for the fire district.  In
the log I have fields such as RunNumber, Calltype, Date, Address, and others.
I need to build a press report from the response log table that includes the
above fields.  To stay compliant with HIPPA regulations, I can not have the
adress field be shown when the Calltype is medical.  I have tried mutiple
expressions and have not accomplished not displaying the address field whe
the Calltype field is medical.  Any suggestions would be most welcome and
appreciated
Signature

E

Klatuu - 10 Jan 2008 20:04 GMT
Use this as the control source for the Address control:

=IIf([CallType] = "Medical", "", [CallType])

Note, use the record source field name, not the report control names.
Signature

Dave Hargis, Microsoft Access MVP

> I am currently working on a response log data base for the fire district.  In
> the log I have fields such as RunNumber, Calltype, Date, Address, and others.
[quoted text clipped - 4 lines]
> the Calltype field is medical.  Any suggestions would be most welcome and
> appreciated
xX Longshank Xx - 10 Jan 2008 21:31 GMT
Thanks for the response.  I tried using the below control source and it
removed the address from the medical but instead of leaving addresses on the
other call types, it repeated the call type.  I tried to replace the ending  
control with address and a #error message was displayed where the address
should be.  To further my understanding of this.  Does the expression you
sent me mean: if f the calltype equals medical then display calltype?

Thanks again and would appreciate any additional help
Signature

E

> Use this as the control source for the Address control:
>
[quoted text clipped - 10 lines]
> > the Calltype field is medical.  Any suggestions would be most welcome and
> > appreciated
Klatuu - 10 Jan 2008 21:38 GMT
No, I wrote it wrong, sorry.  It should be:
=IIf([CallType] = "Medical", "", [Address])

It means If the CallType Field in the reports record source is equal to
Medical, then nothing will display.  If it is not medical, the address will
display.

I used the word "Medical" per your examle.  Use whatever the value in
CallType would be to indicate medical.

Signature

Dave Hargis, Microsoft Access MVP

> Thanks for the response.  I tried using the below control source and it
> removed the address from the medical but instead of leaving addresses on the
[quoted text clipped - 19 lines]
> > > the Calltype field is medical.  Any suggestions would be most welcome and
> > > appreciated
xX Longshank Xx - 10 Jan 2008 22:05 GMT
I tried you correction and instead of displaying the address, it displays
#error and has a message that states "this control has a reference to
itself".  I am placing the expression in the control source protperty of the
Address control.  I tried placing hte expression in the Calltype control but
that did not work either.
Signature

E

> No, I wrote it wrong, sorry.  It should be:
> =IIf([CallType] = "Medical", "", [Address])
[quoted text clipped - 29 lines]
> > > > the Calltype field is medical.  Any suggestions would be most welcome and
> > > > appreciated
Klatuu - 10 Jan 2008 22:09 GMT
It should be in the Address control.
The problem may be that the record source field name and the report control
name are the same.  I know Access does this by default, but it can cause this
sort of problem.  Try renaming the control to something like txtAddress.  The
txt, using Reddick naming conventions means the name referres to a text box
control.
Signature

Dave Hargis, Microsoft Access MVP

> I tried you correction and instead of displaying the address, it displays
> #error and has a message that states "this control has a reference to
[quoted text clipped - 35 lines]
> > > > > the Calltype field is medical.  Any suggestions would be most welcome and
> > > > > appreciated
xX Longshank Xx - 10 Jan 2008 22:42 GMT
I tried renaming the control to txtAddress but the same #error is displayed
where addresses should be shown.  I get the following message when I move the
cursor over the warning symple next to the expression box in design view
"Invalid control property: control source circular referrence.  Thanks for
hanging in there with me.
Signature

E

> It should be in the Address control.
> The problem may be that the record source field name and the report control
[quoted text clipped - 42 lines]
> > > > > > the Calltype field is medical.  Any suggestions would be most welcome and
> > > > > > appreciated
Klatuu - 10 Jan 2008 22:49 GMT
I am stumped.  That should work.  I have never seen that error before.
Signature

Dave Hargis, Microsoft Access MVP

> I tried renaming the control to txtAddress but the same #error is displayed
> where addresses should be shown.  I get the following message when I move the
[quoted text clipped - 48 lines]
> > > > > > > the Calltype field is medical.  Any suggestions would be most welcome and
> > > > > > > appreciated
xX Longshank Xx - 10 Jan 2008 22:45 GMT
I jsut noticed that when I edited the control source name it updated the
control source protoperty.  I edited the property and it works like a champ.  
Thanks for your help.  Can I make a  macro that would generate a weekly run
report automatically on Tuesdays?
Signature

E

> It should be in the Address control.
> The problem may be that the record source field name and the report control
[quoted text clipped - 42 lines]
> > > > > > the Calltype field is medical.  Any suggestions would be most welcome and
> > > > > > appreciated
 
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.