Only show filtered records in a lookup item

22 views
Skip to first unread message

Ami S

unread,
Jun 26, 2025, 2:45:24 AM6/26/25
to Jam.py Users Mailing List
I am a learner and maybe the question is a bit naive.
I have a Contacts item table with Contacts falling under different Categories: Customer, Transporter, Supplier let's say. 
The Category field of Contacts is a lookup field (bound to a separate Categories item) and is set while creating a New Contact.

Here's what I'm trying to achieve.
A Sales Invoice has a Customer and a Purchase Invoice has a Supplier.
While I create a new Sales Invoice, I only need the Customer category of Contacts to appear as the lookup item. And similarly, for a new Purchase Invoice, I only need the Supplier category of Contacts to appear in the lookup instead of all Contacts.

If not an example/minimal code, can someone point to the documentation part which may help me?

Thanks
Amith

SS P

unread,
Jun 26, 2025, 3:46:33 AM6/26/25
to Jam.py Users Mailing List
I think you can go through this:


A method similar to the example in the link worked for me. Maybe there are other ways as well.

Dean D. Babic

unread,
Jun 26, 2025, 7:53:25 AM6/26/25
to Jam.py Users Mailing List
The V7 Docs are here:

I think what is needed is a conditional lookup like here for Category:
https://msaccess.pythonanywhere.com/
Reply all
Reply to author
Forward
0 new messages