I'm new on MS access and I'm strugling in accomplish a query to find out which partners has not paid in a particular selected month/year.
I have 2 tables, one I have all the partners name (Sócios
) and the second, the table (Registro de Pagamento
) registered all the payments for all partners including the month & year of the payment.
I don't if the way I'm trying is the best.but , firstly, I created a Form to allow user to select the month (Combo box: TBoxMes
) and the year (Combo box: TBoxAno
) of his interest to find out which partners has not paid on selected period.
My idea then was to created a query (named as Selecionar_Mes_Cobranca
) including partner's name and also the month and the year of each payment done from Registro de Pagamento
table, I also have set the relation between the 2 tables as display all register from Socios
table as the picture below is shown.
however, on the criteria field for the month and the year, I was trying to include the following expression <>[Forms]![Selecionar_Mes_Cobranca]![TBoxMes]
into the Month field and the <>[Forms]![Selecionar_Mes_Cobranca]![TBoxAno]
into the Year Field. The idea was to return only the partners name which has no register from the selected Month and Year from user, however, it has not worked and I would like some help to understand why and how to accomplish that.
Thanks in advance