Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report groupping 1

Status
Not open for further replies.

axism

MIS
May 17, 2005
58
Hi guys,

I have a table with 4 columns, name, phone, type, address.
I have a query:
select name, phone, right(phone,4) as ext, type, address from tbl
My question is when I try to do a report, groupping by type(is either homephone#, office #, or cell #). On the report, I have 3 text boxes txtname, txtaddress and txtnumber. What I want is to dispel name, address and number, but I want to display the right number depending on what type of number it is. Let say if the type is office #, i want to display name, adddress and extension only. And when type is home#, I want to display name, address, and full phone#. I can only get txtphone to bind to one field now. Is there a way to make it to bind to different source depending on what type it is? thnx in advance.
 
try:

in the recordsource of the textbox, use
iif(tbxType = 'whatever', format(value, "format"), format(value, "otherFormat"))

of course you would need to have the tbxType textbox within the details section of the group...

--------------------
Procrastinate Now!
 
Thanks for replying. That was a bad example i gave. Let me try this again. If i have 5 fields; name, home#, office#, fax#, and type. type consister of home, fax, office. In my report, i want to displace just name and #.
so, i have name textbox bind to name field. # txtbox bind to home# filed now. what i want is to have # txtbox bind to different field depending on what the type is. Is this possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top