Query Criteria

kev88

Registered User.
Local time
Today, 03:47
Joined
Mar 7, 2011
Messages
32
Hi there,

I have been requested to complete a query where only records which are above the "net value" entered by the user are displayed. For example, if I entered £100 into the database, it would display records of £100 and over and not records that have a "net value" of £50.

Screenshot:

i52.tinypic . com / 10iazkh.jpg

What should I include in the criteria to allow this to happen? Do I need criteria in the 2nd column? (e.g. only displays net values greater than the entered amount in 1st column?)
 
After Update event of the textbox where you enter the amount
Code:
If Len(Me.[COLOR=Red]txtboxName[/COLOR] & vbNullString) <> 0 Then
     Me.Filter = "[[COLOR=Red]AmountField[/COLOR]] >= " & Me.[COLOR=Red]txtboxName[/COLOR]
     Me.FilterOn = True
End If
Amend the bits in red.

This is for a form of course.

If it's a paramterised query, then the criteria will be:
Code:
>= [Enter Amount]
 
I have added this but when I run the query, nothing comes up?

i52. tinypic. com /11rqcfo.jpg

what have I done wrong? Sorry Im not too experienced with Access.
 
When you enter a value, you have to move the cursor to another control for the code to run.
 
Sorry what do you mean by that? I have very limited experience with Access :)
 
thanks for the link

i had a look and i cant find anything about this specific problem I have about displaying data that is over the entered value?
 
You should be able to come up with something from reading the section "Ask variations of a question by using parameters with a query" and from what I showed you here -->
If it's a paramterised query, then the criteria will be:
Code:
>= [Enter Amount]
 

Users who are viewing this thread

Back
Top Bottom