M
Mike
I have a form that uses 3 subforms for it's data. The main
form has the following text boxes:
[DirectWages]
RecordSource: =nnz(IIf([QTDInputDataDirect subform].Form!
Type="Direct",[QTDInputDataDirect subform].Form!
SumOfSumOfPay,0))
[DirectHours]
RecordSource: =nnz(IIf([QTDInputDataDirect subform].Form!
Type="Direct",[QTDInputDataDirect subform].Form!
SumOfHours,0))
[IndirectWages]
RecordSource: =nnz(IIf([QTDInputDataIndirect subform].Form!
Type="Indirect",[QTDInputDataIndirect subform].Form!
SumOfSumOfPay,0))
[IndirectHours]
RecordSource: =nnz(IIf([QTDInputDataIndirect subform].Form!
Type="Indirect",[QTDInputDataIndirect subform].Form!
SumOfHours,0))
This works great as long as each emplyee has data for both
[DirectWages] and [IndirectWages]. If an employee only has
1 type of wage, then the other textbox displays #Error.
This causes a problem with another text box that I use to
total both wages:
[TotalWages]
RecordSource: =nnz([DirectWages]+[IndirectWages])
The subforms get their data from a seperate query:
QTDInputDataDirect
QTDInputDataIndirect
I would like the text boxes to display a zero when an
employee has not earned a type of wage.
The subforms are linked by the EmployeeID to the master
form.
Thanks!
form has the following text boxes:
[DirectWages]
RecordSource: =nnz(IIf([QTDInputDataDirect subform].Form!
Type="Direct",[QTDInputDataDirect subform].Form!
SumOfSumOfPay,0))
[DirectHours]
RecordSource: =nnz(IIf([QTDInputDataDirect subform].Form!
Type="Direct",[QTDInputDataDirect subform].Form!
SumOfHours,0))
[IndirectWages]
RecordSource: =nnz(IIf([QTDInputDataIndirect subform].Form!
Type="Indirect",[QTDInputDataIndirect subform].Form!
SumOfSumOfPay,0))
[IndirectHours]
RecordSource: =nnz(IIf([QTDInputDataIndirect subform].Form!
Type="Indirect",[QTDInputDataIndirect subform].Form!
SumOfHours,0))
This works great as long as each emplyee has data for both
[DirectWages] and [IndirectWages]. If an employee only has
1 type of wage, then the other textbox displays #Error.
This causes a problem with another text box that I use to
total both wages:
[TotalWages]
RecordSource: =nnz([DirectWages]+[IndirectWages])
The subforms get their data from a seperate query:
QTDInputDataDirect
QTDInputDataIndirect
I would like the text boxes to display a zero when an
employee has not earned a type of wage.
The subforms are linked by the EmployeeID to the master
form.
Thanks!