Hi
I am using Access 2000.
I have a table called tblData which has a field called Exit. The descriptions of Exit codes are in a table called tblDispCodes.
My database is for entering patient data and I want to have the user be able to print off a summary of entered data per abstract once a record is completed. The unique patient identifier is acctno. The report is based on qryData and in the acct number field in the query I have it equal to Forms!frmDataCollect!acctno. Frmdatacollect is the form where the command button is to print the report. On the report, however, I want the exit description to show up, not the exit code.
In the report I have the field as:
=DLookUp("[DispName]","tblDispCodes","[DispID]= '" & DLookUp("[Exit]","tblData") & "'")
This works fine but only selects the exit code from the first record and not per record. How do I include further identifier for this? My attempt that didn't work:
=DLookUp("[DispName]","tblDispCodes","[DispID] = '" & DLookUp("[Exit]","qryData") & "And [AcctNo] = '" & DLookUp("[AcctNo]","qryData") & "'")
Note that AcctNo is a text field.
Any and all assistance greatly appreciated.
Shelby
I am using Access 2000.
I have a table called tblData which has a field called Exit. The descriptions of Exit codes are in a table called tblDispCodes.
My database is for entering patient data and I want to have the user be able to print off a summary of entered data per abstract once a record is completed. The unique patient identifier is acctno. The report is based on qryData and in the acct number field in the query I have it equal to Forms!frmDataCollect!acctno. Frmdatacollect is the form where the command button is to print the report. On the report, however, I want the exit description to show up, not the exit code.
In the report I have the field as:
=DLookUp("[DispName]","tblDispCodes","[DispID]= '" & DLookUp("[Exit]","tblData") & "'")
This works fine but only selects the exit code from the first record and not per record. How do I include further identifier for this? My attempt that didn't work:
=DLookUp("[DispName]","tblDispCodes","[DispID] = '" & DLookUp("[Exit]","qryData") & "And [AcctNo] = '" & DLookUp("[AcctNo]","qryData") & "'")
Note that AcctNo is a text field.
Any and all assistance greatly appreciated.
Shelby