Form based on field in record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I develop a form that only has records in it from my access database
that contain a 'y' in the Paid field?
 
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.
 
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."
 
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."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top