Aaron_Robertson Posted February 23, 2006 Report Share Posted February 23, 2006 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 reportThanks IN Advance Aaron RobertsonI hope my Wee diagram below helps at all...------------------HEAD TYPE REPORT --------------------------------------------Job No HEAD TYPE---------------------------------------------------------------------"0001" HEADA"0002" HEADC"0003" HEADA"0004" HEADBI know im a geek Quote Link to comment Share on other sites More sharing options...
RicoAUBL Posted February 23, 2006 Report Share Posted February 23, 2006 have you tried turning it off and on again ?:] Quote Link to comment Share on other sites More sharing options...
Chris Posted February 23, 2006 Report Share Posted February 23, 2006 Real geeks don't use Access. Quote Link to comment Share on other sites More sharing options...
doom donkey Posted February 23, 2006 Report Share Posted February 23, 2006 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 Quote Link to comment Share on other sites More sharing options...
Aaron_Robertson Posted February 23, 2006 Author Report Share Posted February 23, 2006 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 likeHead 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 Quote Link to comment Share on other sites More sharing options...
doom donkey Posted February 23, 2006 Report Share Posted February 23, 2006 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 likeHead Type = Iff([Heada] Is Not Null' date='[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 myselfOk, had another play and got it to work using the following, =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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.