Jump to content
aberdeen-music

Programmers with MS ACCESS HELP ME !!


Aaron_Robertson

Recommended Posts

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

:p

I know im a geek

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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' 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 myself

Ok, 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...