I am trying to run a query with a criteria based upon a figure which is set in a subform. 
form called - ViewCompanyInfo
subform called - ViewContactInfo
textbox called - ID
I can run queries based on textboxes from the main form easily using a criteria: [Forms]![ViewCompanyInfo].[Company] which displays a particular company record.
When I try to set it so that I can display a particular record based upon an individual shown in the subform it brings up a small window asking for the value to be entered, instead of using the value held in the subform.
I have tried various criteria including:
[Forms]![ViewCompanyInfo]![ViewContactInfo].[ID]
[ViewCompanyInfo]![ViewContactInfo].Form![ID]
[ViewCompanyInfo]![ViewContactInfo]![Forms].[ID]
[Forms]![ViewCompanyInfo]![ViewContactInfo].[Form]![ID]
[Forms]![ViewCompanyInfo]![Subform]![ViewContactInfo].[ID]
Nothing seems to work. Can anyone please give me the criteria to enter.

form called - ViewCompanyInfo
subform called - ViewContactInfo
textbox called - ID
I can run queries based on textboxes from the main form easily using a criteria: [Forms]![ViewCompanyInfo].[Company] which displays a particular company record.
When I try to set it so that I can display a particular record based upon an individual shown in the subform it brings up a small window asking for the value to be entered, instead of using the value held in the subform.
I have tried various criteria including:

[Forms]![ViewCompanyInfo]![ViewContactInfo].[ID]
[ViewCompanyInfo]![ViewContactInfo].Form![ID]
[ViewCompanyInfo]![ViewContactInfo]![Forms].[ID]
[Forms]![ViewCompanyInfo]![ViewContactInfo].[Form]![ID]
[Forms]![ViewCompanyInfo]![Subform]![ViewContactInfo].[ID]
Nothing seems to work. Can anyone please give me the criteria to enter.
