I'm trying to make a relation between two tables to show information through a Macro. To give a perspective, I have a table called 'Companies' where there are all the information needed. I've made a 'Home' form where there is a SubForm to show the companies.
My idea is that the field 'Companies' of this subform, which shows the name of the company, could link to another subform called 'Companies Detail' through the ID.
So far, I've done this to the macro (the id field is called Id_company).:
The syntaxis is in spanish so sorry for that and hope this could be understable:
Code:
If EsNulo([Formularios]![Consulta para Detalle Empresas]![Id_company])
then do a BIP.
Code:
If NoEs EsNulo([Formularios]![Consulta para Detalle Empresas]![Id_company])
then and in the conditions on I've written:
Code:
="[Id]=" & [Id_company]
The idea is that when you click on the name of the company in the Home form, this redirects to the 'Consulta para Detalle Empresas' form. I can't get it working. I'd like to hear opinions and I'll share more information and do my best to make it understandable if it isn't at all. Thank you in advance.