Nov 16 2005, 11:14 AM
I have a query that I am using on a form to select which receipt I want to print for a member:
SELECT Members.ID, Members.First, Members.Last, Members.Print
The thing is that when I look at the list of members to print it will show all members even if they don't have an offering in the offering table.
I tried to add the offering table to the query but it then shows a line for the same member for each offering entered. So then I add the 'DISTINCT' statement which narrows the list to one name for each member that has an entry in the offerings table but I can't click the checkbox to select them to print.
Also I noticed that with the first query that shows one line for each member, there is always a blank row at the bottom and when the checkbox is selected it adds a blank record to the members table. I know I wouldn't check this box but I was thinking if the intended user does this it would be a pain. Is there a way to hide the "New record" Item?
Is there any way that I can do this?
Nov 16 2005, 12:15 PM
To get a list of of members that are also in the offering table, but without any offering table data use something like the following:
SELECT ID, First, Last, Print
where id in
(select id from offerings_tbl)
(select distinct id from offerings_tbl)
Note: you may wish to change some of your fields names if they are also reserved words as this could cause you some grief later.
Nov 16 2005, 01:45 PM
Do you mean the feilds like 'First' 'Last' and such?
As for the query, what you sugested it worked.
As for the blank 'new field' entry, is there anything that can be done to hide this?
Nov 16 2005, 06:13 PM
Yes, First and Last are both MS Jet SQL Functions and Print is an Access method.
As for the blank new field entry, I'm having a hard time visualizing it, so could someone else please take a stab at that one?
Nov 17 2005, 08:12 AM
Ohh, yeah I guess I'll have to change those.
For the empty feild I'll try to help this way...
When you look at a table of data you know how the last row is always an empty row to enter a new record in? Well when I use the print select query to display the list of members on my print form that has a list of the names and the checkbox the last entry is that blank record.
Maybe that helps..
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here