By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

Weight loss calculations

P: 2
Hi All,

I'm hoping someone is able to help me with the following:

I am creating a database for a weightloss group. The database is relational and has one table containing client details. There is another table containing consultation details. As each client is having more than one consultation this seemed sensible. The two tables are linked by a client ref no. in a one-to-many relationhip. The 'consultation details' records contain the client ref no.; date; and weight measurement.

I now want to create an expression that calculates the difference between the weight recorded in the first consultation and the weight recorded in the last consultation for a given client ref no.

I have absolutely no idea how to do this and would be grateful for any assistance.
Feb 8 '08 #1
Share this Question
Share on Google+
3 Replies


Jim Doherty
Expert 100+
P: 897
Hi All,

I'm hoping someone is able to help me with the following:

I am creating a database for a weightloss group. The database is relational and has one table containing client details. There is another table containing consultation details. As each client is having more than one consultation this seemed sensible. The two tables are linked by a client ref no. in a one-to-many relationhip. The 'consultation details' records contain the client ref no.; date; and weight measurement.

I now want to create an expression that calculates the difference between the weight recorded in the first consultation and the weight recorded in the last consultation for a given client ref no.

I have absolutely no idea how to do this and would be grateful for any assistance.
Welcome to the scripts typhoo1!

See attached zipped mdb file done as a single query in SQL derived from two tables the query of which will open automatically when you open the database. This should give you an idea of at least one way of doing it. There are other ways of course such as using Aggegate functions in Access DCount, DSum, DMax, DMin, DFirst, DLast, DAvg, Dlookup etc Have a look at the those functions in help and how you can use them within your application.

Regards

Jim :)
Attached Files
File Type: zip typhoo1.zip (13.3 KB, 133 views)
Feb 9 '08 #2

P: 2
Thank you so much. It works! couldn't of done it without your help.

Welcome to the scripts typhoo1!

See attached zipped mdb file done as a single query in SQL derived from two tables the query of which will open automatically when you open the database. This should give you an idea of at least one way of doing it. There are other ways of course such as using Aggegate functions in Access DCount, DSum, DMax, DMin, DFirst, DLast, DAvg, Dlookup etc Have a look at the those functions in help and how you can use them within your application.

Regards

Jim :)
Feb 11 '08 #3

Jim Doherty
Expert 100+
P: 897
Thank you so much. It works! couldn't of done it without your help.
You're welcome :)

Jim
Feb 11 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.