Form based on field in record

B

Bill Walsh

How can I develop a form that only has records in it from my access database
that contain a 'y' in the Paid field?
 
B

Bill Walsh

Al, thanks. Paid is a text field and only indicates that someone has paid to
play in a match. You mentioned that I would need to add a query behind the
form. How do I do that as well. I have followed Help instructions and I
don't get any results.
 
A

Al Campagna

Bill,
What type of field is Paid... Text (for a "y" or "n")? Your post seems
to intimate that.
Does it always contain either a null or a "y" or an "n"
It really should be a Boolean True/False, but I'll assume a text "y" or
"n".

In the query behind the form, use this criteria against the Paid field...
= "Y"
If the "Y" is part of a longer string in Paid...
Like "*" &"Y" & "*"

I should add however that Paid really should be determined by adding up
the Cost, and subtracting the Paid, and determining the result...
(Paid (0), or remaining balance (+), or credit (-))
rather than a manual Paid = "y" or Paid = True.

------
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 
A

Al Campagna

Bill,
Probably you have a table associated with your form now... we want a
query to "feed" the form, so we can add the Paid = "y" criteria.
Look at the Form's properties.
Place your cursor in the ControlSource property box.
Click the 3 dot button(...) on the right.
You are now in Query Design mode.
Add your table to the query, and add the tables fields to the grid, and
give the Paid field the following criteria...
= "y"
---
hth
Al Campagna
Access MVP 2007
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love, and you'll never work a day in your life."
 
Top