dkmoreland
Registered User.
- Local time
- Yesterday, 22:39
- Joined
- Dec 6, 2017
- Messages
- 129
Here's the scenario:
The Input form is tied to the Input table, which holds an Autonumber ID field. If the value of the Accept/Recheck field is equal to Recheck, a record is created in the Non Conformance table that includes the ID and an NCR number.
What I am trying to do is display on the Input form (in a text box) the NCR number (from Non Conformance table) that corresponds to the id number for the current record. Note that not all records in the Input Table will create a record in the Conformance table.
Here's the SQL for the query:
SELECT Input.ID AS Input_ID, Input.[Accept/Recheck], [Non Conformance].ID AS [Non Conformance_ID], [Non Conformance].[NCR#]
FROM [Non Conformance] INNER JOIN [Input] ON [Non Conformance].ID = Input.ID
WHERE (((Input.[Accept/Recheck])="Recheck"));
Here is the Dlookup I have in the Control source for the textbox:
=DLookUp("NCR#","Input Query3","ID=" & [Input].[id])
I am getting a #Name error and do not know why.
Can anyone offer any insight? Also, do I need to wrap this with an Nz function to take care of instances in which there is no NCR number?
Thanks in advance
The Input form is tied to the Input table, which holds an Autonumber ID field. If the value of the Accept/Recheck field is equal to Recheck, a record is created in the Non Conformance table that includes the ID and an NCR number.
What I am trying to do is display on the Input form (in a text box) the NCR number (from Non Conformance table) that corresponds to the id number for the current record. Note that not all records in the Input Table will create a record in the Conformance table.
Here's the SQL for the query:
SELECT Input.ID AS Input_ID, Input.[Accept/Recheck], [Non Conformance].ID AS [Non Conformance_ID], [Non Conformance].[NCR#]
FROM [Non Conformance] INNER JOIN [Input] ON [Non Conformance].ID = Input.ID
WHERE (((Input.[Accept/Recheck])="Recheck"));
Here is the Dlookup I have in the Control source for the textbox:
=DLookUp("NCR#","Input Query3","ID=" & [Input].[id])
I am getting a #Name error and do not know why.
Can anyone offer any insight? Also, do I need to wrap this with an Nz function to take care of instances in which there is no NCR number?
Thanks in advance