| General Discussion Forums for all discussion about everything else non-music or scene related. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
![]() ![]() |
Hello,
I want to generate a report in Access That is defined by Job Number.. And Head Type.. ok so the Job Number is already defined when the user IE Press's "0001" and it displays the information per head type.. I only want it to display like this "HeadA" "HeadB" "HeadC" So i want access to work like this.. In "0001" If "HeadA" Is present then display "HeadA" If not Then look for "HeadB" if "HeadB" Is present then display "HeadB" and If "HeadA" or "HeadB" is not present the display "HeadC" . How do i go about showing this in a report Thanks IN Advance ![]() Aaron Robertson I hope my Wee diagram below helps at all... ------------------ ¦HEAD TYPE REPORT ¦ -------------------------------------------- ¦Job No¦ HEAD TYPE¦------------------------- -------------------------------------------- "0001" HEADA "0002" HEADC "0003" HEADA "0004" HEADB ![]() I know im a geek |
|
|
|
|
|
#4 (permalink) |
![]() |
Real geeks don't use Access.
__________________
When did mediocrity and banality become a good image for your children? ... Fuck that! I want my rock stars dead! I want them to fucking play with one hand and put a gun in their other fucking hand and go "I hope you enjoy the show!" *Bang!* Yes! Yes! Play from your fucking heart! ~ Bill Hicks |
|
|
|
|
|
#5 (permalink) |
![]() ![]() |
Ok, I was a wee bit bored a work, if you open the report in design view and put something like the following as the control source for the HEAD TYPE field it should work (maybe, I didn't bother testing it as I'm not that bored)
=IIf([HEADA] Is Not Null,[HEADA],(IIf([HEADB] Is Not Null,[HEADB],[HEADC]))) Hope that helps |
|
|
|
|
|
#6 (permalink) |
![]() ![]() |
Thanks!
That code sounds right but how do i get it to choose the "Head Type" Column from the table if you know what i mean like Head Type = Iff([Heada] Is Not Null,[Heada],(IIf([Headb] Is Not Null,[headb],[headc]))) or Iff([Heada] Is Not Null,[Heada],(IIf([Headb] Is Not Null,[headb],[headc]))) - I want to run this command for a spefic column.. Sorrry if im confusing u i am a little confused myself |
|
|
|
|
|
#7 (permalink) | |
![]() ![]() |
Quote:
=IIf(Not IsMissing([Heada]),[Heada],IIf(Not IsMissing([Headb]),[Headb],[Headc])) I'm assuming here that heada, headb etc are fields in a table. If so you create a report (I used the wizard) containing Job number and heada, then open the report in design view, right click on heada in the detail section and select properties, paste the above code in the "control source field" on the data tab, rename the text box on the other tab so it's not heada (gets confused between the text box and field name) and it should all be cool. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is a record deal all its cracked up to be? | Hogisbald | Music Discussion | 29 | 23-03-2006 17:16 |
| Firefox prone to hackers as much as Internet Explorer | Snakebite | General Discussion | 71 | 01-08-2005 00:53 |
| Programmers.. | gilly | General Discussion | 24 | 03-03-2005 12:39 |