Greg Hains Posted December 20, 2011 Posted December 20, 2011 Hi, I have a problem which I know will be easily solved but just cannot work out what Im doing wrong. I have two tables. Clients and Episodes. These tables are related via a field called "ClientID". The Episodes table contains date fields called "Opened" and "Closed" If a record has a date in the "Opened" field but not the "Closed" field, then the status of that episode is considered opened. From the Clients table, I want to be able to determine how many records in the Episodes table have that status of open for that client. As I say, it is a simple thing but I'm doing something fundamentally wrong. Do I need to setup a different relationship, or Calculation field in Clients? Any help is appreciated. Cheers, Greg
comment Posted December 20, 2011 Posted December 20, 2011 Assuming no episode is closed without being opened first, try = Count ( Episodes::Opened ) - Count ( Episodes::Closed )
Greg Hains Posted December 21, 2011 Author Posted December 21, 2011 Hi Comment. Thanks for the reply. I can see what that does, but what of the relationship between the two tables? Do I need to do something different?
comment Posted December 21, 2011 Posted December 21, 2011 No, this should work over your existing relationship.
Greg Hains Posted December 21, 2011 Author Posted December 21, 2011 Comment. I eat my last post - I shouldnt have questioned you... It gave me the information I need to resolve my query. Many thanks... yet again. :-)
comment Posted December 21, 2011 Posted December 21, 2011 I shouldnt have questioned you... Always question everything. :cool: 1
Recommended Posts
This topic is 4781 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now