I have a table tblGenerators with a field/primary key GenID#
A table tblPSWMain (primary key PSW#) which is a child of tblGenerators with a linked field GenID#
A table tblCtransPickups (primary key Ctrans#), also a child of tblGenerators with a linked field GenID#
I have a process that uses a table tblSpecOff with fields PSW#, Ctrans# and RptDate.
The records in tblSpecOff will either have a PSW# or a Ctrans# but not both.
tblSprcOff has three forms where data is entered.
In the first form a new record is generated and some general information is added.
In the second form some work instructions are entered.
The second form is where I'm having a problem. (haven't gotten to the third)
The second form frmSalesEntry is based on a query qrySalesEntry that returns records that do not have a RptDate
The query also takes the fields PSW# and Ctrans# combines them in to one field called GenID with an if statement in the criteria.
So far things are working up to here, but I think this if statement is my problem.
In my second form frmSalesEntry I made the field GenID a combo box based on a select query that uses the GenID from the qrySalesEntry query
The select query has 7 fields other than GenID.
I put 7 unbound text boxes on frmSalesEntry to display the other fields of the select query which come from tblGenerators.
The problem is that the unbound text boxes are returning '#Name?'
The control source for the unbound text boxes looks like =[GenID].Column(1) "which works fine on all my other forms that have select queries.
A table tblPSWMain (primary key PSW#) which is a child of tblGenerators with a linked field GenID#
A table tblCtransPickups (primary key Ctrans#), also a child of tblGenerators with a linked field GenID#
I have a process that uses a table tblSpecOff with fields PSW#, Ctrans# and RptDate.
The records in tblSpecOff will either have a PSW# or a Ctrans# but not both.
tblSprcOff has three forms where data is entered.
In the first form a new record is generated and some general information is added.
In the second form some work instructions are entered.
The second form is where I'm having a problem. (haven't gotten to the third)
The second form frmSalesEntry is based on a query qrySalesEntry that returns records that do not have a RptDate
The query also takes the fields PSW# and Ctrans# combines them in to one field called GenID with an if statement in the criteria.
Code:
GenID: IIf(tblCtransPickups![GenID#] Is Null,tblPSWmain![GenID#],tblCtransPickups![GenID#])
In my second form frmSalesEntry I made the field GenID a combo box based on a select query that uses the GenID from the qrySalesEntry query
The select query has 7 fields other than GenID.
I put 7 unbound text boxes on frmSalesEntry to display the other fields of the select query which come from tblGenerators.
The problem is that the unbound text boxes are returning '#Name?'
The control source for the unbound text boxes looks like =[GenID].Column(1) "which works fine on all my other forms that have select queries.