Ive posted this problem once already and didn't get a good response. Maybe this forum will be able to help a bit better.
A little background into the structure
Corporations.CorporationID
Corporations.CorporationName
Directors.PersonID
Directors.CorporationID
Officers.PersonID
Officers.CorporationID
Shareholders.PersonID
Shareholders.CorporationID
People.PersonID
Ok, that is the above structure/fields I am using. What I want to accomplish is this - a user enters a Person's name into a field (the PersonID is stored). I want to generate a REPORT doing the following:
Director Officer Shareholder
Corporation1 Yes No Yes
Corporation2 Yes No No
Corporation6 No No Yes
Basically, just a small chart saying if a person is a director/officer/shareholder of a corporation. The only thing I DONT want to display is the case where a person has no relation to the Corporation (above, by Corporations3-5)
These are the queries I am using right now:
DoCmd.RunSQL ("SELECT Officers.[Corporation ID] INTO temp_for_officers FROM Officers WHERE (((Officers.[personID])= Forms![Search Page]![personSearch]));"
DoCmd.RunSQL ("SELECT Directors.[Corporation ID] INTO temp_for_directors FROM Directors WHERE (((Directors.[personID])= Forms![Search Page]![personSearch]));"
DoCmd.RunSQL ("SELECT Shareholders.[Corporation ID] INTO temp_for_shareholders FROM Shareholders WHERE (((Shareholders.[personID])= Forms![Search Page]![personSearch]));"
These are adequate queries imo - so now all I have to do is the Report. These are the fields I display.
[corpIDTag]=[Corporation ID]
=Not IsNull(DLookUp("[Corporation ID]","temp_for_directors","[Corporation ID] = [corpIDTag]")
=Not IsNull(DLookUp("[Corporation ID]","temp_for_officers","[Corporation ID] = [corpIDTag]")\=Not IsNull(DLookUp("[Corporation ID]","temp_for_shareholders","[Corporation ID] = [corpIDTag]")
Now if I manually assign [corpIDTag], then the report displays perfectly. It's just that I don't know what to set the CONTROL SOURCE of [corpIDTag] to! Once I get this, my project is done!!!! Yippee!
Please please help me out. I'm so close - I can taste it.
A little background into the structure
Corporations.CorporationID
Corporations.CorporationName
Directors.PersonID
Directors.CorporationID
Officers.PersonID
Officers.CorporationID
Shareholders.PersonID
Shareholders.CorporationID
People.PersonID
Ok, that is the above structure/fields I am using. What I want to accomplish is this - a user enters a Person's name into a field (the PersonID is stored). I want to generate a REPORT doing the following:
Director Officer Shareholder
Corporation1 Yes No Yes
Corporation2 Yes No No
Corporation6 No No Yes
Basically, just a small chart saying if a person is a director/officer/shareholder of a corporation. The only thing I DONT want to display is the case where a person has no relation to the Corporation (above, by Corporations3-5)
These are the queries I am using right now:
DoCmd.RunSQL ("SELECT Officers.[Corporation ID] INTO temp_for_officers FROM Officers WHERE (((Officers.[personID])= Forms![Search Page]![personSearch]));"
DoCmd.RunSQL ("SELECT Directors.[Corporation ID] INTO temp_for_directors FROM Directors WHERE (((Directors.[personID])= Forms![Search Page]![personSearch]));"
DoCmd.RunSQL ("SELECT Shareholders.[Corporation ID] INTO temp_for_shareholders FROM Shareholders WHERE (((Shareholders.[personID])= Forms![Search Page]![personSearch]));"
These are adequate queries imo - so now all I have to do is the Report. These are the fields I display.
[corpIDTag]=[Corporation ID]
=Not IsNull(DLookUp("[Corporation ID]","temp_for_directors","[Corporation ID] = [corpIDTag]")
=Not IsNull(DLookUp("[Corporation ID]","temp_for_officers","[Corporation ID] = [corpIDTag]")\=Not IsNull(DLookUp("[Corporation ID]","temp_for_shareholders","[Corporation ID] = [corpIDTag]")
Now if I manually assign [corpIDTag], then the report displays perfectly. It's just that I don't know what to set the CONTROL SOURCE of [corpIDTag] to! Once I get this, my project is done!!!! Yippee!
Please please help me out. I'm so close - I can taste it.