Dlookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have Two Forms A main form calll Add_Debit_notes and A subform call
Debit_notes_derails_subform. the Dlookup below works in the form
Debits_notes_details_subform when I open it as a form but when I insert it as
a subform it dose not please can someone help me.

=DLookUp("[MMITNO]","[product_lookup]","[ORCUIT]='" &
Forms!debit_notes_details_subform!debit_note_item_number & "'").

thank you
 
The subform is not open in its own right, i.e. it is not part of the Forms
collection

Try:
=DLookUp("[MMITNO]","[product_lookup]","[ORCUIT]='" &
[debit_notes_details_subform].[Form]![debit_note_item_number] & "'").


If that still does not work:
1. Open the main form in design view.
2. Right-click the edge of the subform control, and choose Properties.
3. Check the Name property of the subform control.
It may be different from its Source Object (the name of the form that is
loaded into the control).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top