Ms Access filter days from qry in cmb

VEndetahd

New member
Local time
Yesterday, 22:31
Joined
Jul 3, 2018
Messages
4
Hello,
i need to filter my overdue days that are constantly changing everyday and for example if i choose overdue day "21" i need to see in my form the clients that are in 21 day.
I began with combobox that shows days,but it shows all ppl with 21 day
 
the main query to pull data will have an extra field:
OverDue: DateDiff("d",[startDate],[DueDate])

then the textbox (or combo) will filter the OverDue dates on what was picked
Code:
sub txtBox_Afterupdate()
If IsNull(txtBox) Then
  Me.FilterOn = False
Else
  Me.Filter = "[Overdue]=" & me.txtBox 
  Me.FilterOn = True
End If
end sub
 
@VEndetahd
I realize this is your first post and welcome.

It is often a good idea to describe your issue in plain English --simple terms - in order to give context to your post/issue.

What exactly is overdue in your set up?
Do you want to identify the exact number of days overdue, or do you need to identify people who are more than X days overdue?

It often helps if you show readers any code you have developed/are using.

Good luck with your project.
 
Sorry,
so in my query i build an criteria on Overdue days table [Forms]![Matching loan ID]![cmbfilter] and when i type it my data vanishes.After removing it the data is back.My combobox is ""SELECT [Matching loan ID].[Loan ID], [Matching loan ID].[Overdue Days] FROM [Matching loan ID] ORDER BY [Matching loan ID].[Overdue Days];""
my after update on the combo is "Me.Requery"
 
I'm not sure I understand your design. In most cases developers will have, for example,
LoanDueDate, then will use a query to do a calculation.

eg. Find all loans where loan is overdue by more than 20 days.

Code:
Select LoanID from LoanTable where datediff("d",LoanDueDate, Date) > 20
 
So i have query that combines my daily database that is coming from external source and our database that includes their name id phone number contact person and cp number.My second querery is about the action description
Daily database comes in excell and i import it in access.The table includes:
loan id
client number
overdue days
overdue amount
and information if he/she has other loan
P.S how my form looks
eXghzy
 
Last edited:
i used this tutorial youtube .com/watch?v=6MVQz5lfxeY and when i try to bind [Forms]![Matching loan ID]![cmbfilter] my data vanished from query
 
Post your database with some sample data, (zip it because you haven't post 10 post yet) + name of the form in which you've the problem.
 

Users who are viewing this thread

Back
Top Bottom