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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Subform with if statement

Status
Not open for further replies.

bailey11

Technical User
Jan 18, 2005
103
US
The link between my master form and sub form is as follows:

(Master) JobNo = (child) TmProjectNo
(Master) PhaseNO = (child) TmPhsNo
(Master) WorkDate = (child) TmWkDate

I need a forth field that also says...

If (field from Master) COR <>0 (Y/N) field, then ignore the (child) "ActivityCode", otherwise (Master) "CORNO"=(child) "ActivityCode"

Is there a way to do this?

Thanks, Bailey11
 
How are ya bailey11 . . .

IF you find it necessary to do this . . . somethings wrong with yur tables & relationships or both! . . . You have a chance of rsolving this if you post back exactly what these items are! . . .

Calvin.gif
See Ya! . . . . . .
 
The issue that makes it so hard is that they have two separate tables they pull the "Activity Code" from. The combination for entry of what they call a job code is: Jobnumber-phase-activitycode"

The activity code could come from two separate tables. If the activity code is enter as part of the job setup, then it is considered a "change order"

otherwise, it comes from a standard activity code table and is simply an activity under a job.

For instance:
Job=26070, Phase = 01, the activity code fiel in the job is null and the Activity codes come from activity table, (i.e., mobilization, ditching, buildings, clean-up, etc.)

Job=26070, Phase 99 (can be 02 through 99), activity code is setup as part of the job, (i.e., 0001, 0002, 0003).

In this report, I need the sub report to look as low as the activity code if it is marked as a change order. If it is not a change order, I need it to stop the link at the phase level.

Any ideas.
 
I figured out another avenue. I created a report that tied at the activity code level and one that tied at the phase level and then used an if statement in the code to determine which one opened/ printed based on the form.

Thanks for the info anyhow.

I really appreciate you guys!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top