Simple calculated field problem

Hi,

I am very new to Access and am trying to do something I think should be 
reasonably simple, but can't work out the syntax I need.

My database is to track weight loss. I have only one table at the moment 
(this will grow but my problem only involves a single table), which is 
called 'Measurements'.  The table has only 3 fields, 'Date', 'Weight' 
and 'Fat%'.

I would like to be able to track weight loss from one day to the next, 
so am trying to make a query that shows, for each day, the values in the 
  Weight and Fat% fields, and a calculated field that shows the previous 
day's weight value (which will allow me to show the weight loss from the 
previous day).

I can create a calculated field to show the previous day's date, but not 
the weight value that is associated with that date.

Being a very raw newbie to Access, I apologise for the how simple this 
problem is to solve, and have been trawling through help files and 
tutorials online to try to solve the problem myself, but the only 
examples seem to be adding or subtracting dates (which I can do), as 
opposed to returning values from different fields associated with those 
dates.

If anyone can offer any assistance I would be very grateful.  Many thanks,

Caroline Brown
0
Caroline
12/26/2007 3:58:33 AM
access.queries 6343 articles. 1 followers. Follow

1 Replies
1216 Views

Similar Articles

[PageSpeed] 5

See:
    Getting a related field from a GroupBy (total) query
at:
    http://www.mvps.org/access/queries/qry0020.htm

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Caroline Brown" <Undisclosed@safe.net> wrote in message
news:Jjkcj.27833$CN4.2472@news-server.bigpond.net.au...
> Hi,
>
> I am very new to Access and am trying to do something I think should be 
> reasonably simple, but can't work out the syntax I need.
>
> My database is to track weight loss. I have only one table at the moment 
> (this will grow but my problem only involves a single table), which is 
> called 'Measurements'.  The table has only 3 fields, 'Date', 'Weight' and 
> 'Fat%'.
>
> I would like to be able to track weight loss from one day to the next, so 
> am trying to make a query that shows, for each day, the values in the 
> Weight and Fat% fields, and a calculated field that shows the previous 
> day's weight value (which will allow me to show the weight loss from the 
> previous day).
>
> I can create a calculated field to show the previous day's date, but not 
> the weight value that is associated with that date.
>
> Being a very raw newbie to Access, I apologise for the how simple this 
> problem is to solve, and have been trawling through help files and 
> tutorials online to try to solve the problem myself, but the only examples 
> seem to be adding or subtracting dates (which I can do), as opposed to 
> returning values from different fields associated with those dates.
>
> If anyone can offer any assistance I would be very grateful.  Many thanks,
>
> Caroline Brown 

0
Allen
12/26/2007 6:59:29 AM
Reply:

Similar Artilces:

Three different fields in one record referencing to three different records in another table
Hi. I have TableA and TableB TableA has 3 fields where types of file extensions (for different purpose) are supposed to be stored. Table B has many extension type strings for these TableA three fields (.tif, .jpg, .pdf, .gif, etc). 3 combo boxes refer to Table B to get and store TableB keys in TableA appropriated fields. When I set up table retaionship, Acces 'creates' also TableB_1 and TableB_2 and show a diagram where two other similar to tabelB tables show up. So long so good. I can create records in TableA having chosen, for each different file purpose, the respective extens...

problems came up in the following areas during load
I get this message when i copy either text or a graphic from the internet (using IE)and attempt to paste it into MS Publisher. The error dialog box says "Problems During Load"...this box normally apprears 20-30 seconds after I click paste. Once I hit OK, the text or graphic will appear. It never did this before. Any suggestions? CPG Co wrote: > I get this message when i copy either text or a graphic from the internet > (using IE)and attempt to paste it into MS Publisher. The error dialog box > says "Problems During Load"...this box normally apprears 20-...

Printing problem when selecting any paper type other than plain pa
I have MSPub 2002 with XP HE and use an HP Inkjet printer cp1700. When I make my brochures I usually put a border around the edge a fill with some color. If I print one page, I have no problem, but if I ask the software to print numerous copies (anything more than 1 such as 2,3,4,etc) when it prints the second, third, forth etc copy, I always get a series of 3 lines after the top border. If I click the printer icon numerous times I do not get this problem or if I print the document in "paper type" plain paper, I do not get the problem. Does anyone ever experience this problem...

Help with simple arithmetic
i have the following declaration and piece of code Dim netProfit As Long netProfit = (7364 - 2298) * 20 Why does it fail with "runtime error 6" Overflow. the result should be 101320, should be okay for Long right ? Any help appreciated. Thanx --- Message posted from http://www.ExcelForum.com/ The right hand side involves only integers, so it evaluates as an integer expression (which overflows). The final result (if it hadn't overflowed) would then be coerced to long. To perform the multiplication as a long instead of an integer, at least one of the numbers must be ...

concatenate several of records in a field to 1 record
Hi all, what is the best way to concatenate several of data records in a field into 1 for example i have the field named animal and inside i have bird,dog and a cow how can i concatenateall of them to have 1 field called bird,dog,cow? Have a look at either http://www.mvps.org/access/modules/mdl0004.htm or http://www.mvps.org/access/modules/mdl0008.htm depending on your setup. --=20 Joan Wild Microsoft Access MVP "thread" <yaniv.dg@gmail.com> wrote in message = news:1179848700.403433.313710@a26g2000pre.googlegroups.com... > Hi all, > what is the best way to concatena...

How do I make certain fields come up based on criteria?
Ok, please keep in mind that I am a beginner...so please make any responses very elementary in nature...THANKS! I have a table that is relaing information about why a child couldn't be placed (Foster Care). I have a Field as a Text Box with Certain prescribed reasons that are a drop down box. Here is my question. How can I have another table OR field appear on the form (that I want to create for inputting data) once they select a certain Reason (there are sub-reasons that go under each reason). Ex: Reason1 has a sub list of reasons (A, B, C) that should appear BUT if Reason2 is s...

Vlookup problems
I have Vlookups set up for a particular Spreadsheet. Each month I just drop the new data into the first column. Even though the number is formatted just like the previous month (i.e general, text, whatever) my vlookup formula shows #N/A. If i double click in the data cell and hit enter, the vlookup formula works. can you tell me why, or if there is a better way than clicking and hitting enter? Thanks! do you have your automatic calculation turned on? Under tools<options<calculation. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip...

E-mail Problem
I have an e-mail server running Windows NT4 SP6a and Exchange 5.5 sp3. When a user of mines attempts to send to one agent out side of the company we receive the below error message. What could be going on. Thanks Reason: Fatal error sending message: No legal recipients Sending message to mdeaton@custard.com -----------------First 8192 bytes of------------------- ------- Unsent message enclosed after this line ------- Received: by exchange.sgic.com from localhost (mail daemon,slmail V5.1); Wed, 18 Aug 2004 13:10:11 -0500 Received: from exchange.sgic.com [10.10.10.24] by exchange.sgic.co...

Reg Additional fields in GP 10
Hi All, It has come to my notice, when i maximize a window like customer or vendor maintenance window. i see few additional fields at the bottom of the window which are not editable. i dont see these fields when the windows are in there original size. This i can see in many windows like address window's etc etc some having different colors in it. Is there any use of these fields or is it a coding error???? This is with respect to GP 10.0. Regards Reddy ...

16-bit Migration
Hi, Im tasked with converting a 16-bit MFC app to 32-bit. Ive used the MFC migration kit as a starter, however this has proved to be pretty useless :-) Bearing in mind Ive not used MFC before in any shape or form, im struggling with a file called CChildDlg.cpp. The header appears to be a stock Microsoft header, but I cant decide if the CPP has been custom written. It loads a dialog resource, then parses it and creates the window and all the controls. But its parsing by ripping raw bytes out of the resource via an incremented BYTE* and not by using DLGITEMTEMPLATE* etc. Since it seems a comm...

Problem with datasheet & 64-bit installations
Once you have installed a 64-bit installation of Office, SharePoint datasheet views can't be used any longer. It's related to the ActiveX component only being compatible for 32-bit systems and not for 64-bit installations. Please refer to http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/9eb920ba-1a02-4f0c-ae08-6e808e0269c4/?prof=required for a complete thread, I wanted to share this here because you Office guys might have some more detail on this (we hope). Should be fixed on short notice if you ask me, it's blocking me from rolling out...

Removing a character in a field
Hi, I have a table which contains an asterisk marks in some of the fields in some records. What would be the easiest way to get rid of them? Wherever there are asterisk, I need them to be Null fields. I tried with Find and replace with "" mark, but it doesnt seem to work. Am I missign something? Thanks Ramesh On Wed, 20 Jun 2007 07:46:59 +0530, "Ramesh" <ramesh2020@gmaildotcom> wrote: >Hi, > >I have a table which contains an asterisk marks in some of the fields in >some records. What would be the easiest way to get rid of them? Wherever >th...

MSCRM API failing with User defined fields.Help !
Iam programming in ASP.NET for my company's MSCRM. I use MSAPI to retrieve and update field values in MSCRM. Iam able to do it with ease by programming in VB.NET with the MSCRM object library. Eg. strUpdateXml = "<account><name>Steve Langer</name><owninguser>{19838938-705A-4AB9-BC2E-2EDD88035EE5}</owninguser> </account>" CRMAccount.Update(UserAuth, RECID, strUpdateXml) It works fine for the normal MSCRM fields LATER, I created USERDEFINED fields in MSCRM. ( with the Deployment Manager and published). The new field created can been seen in...

Problem with List Control Box
I have a list control with 3 columns. For some reason when I try to insert an entry into the list control, sometimes, only the item's first value gets added, but the values for the 2nd and 3rd column are not there. If i continue to add the same entry consistently, eventually the entry will be added correctly with all three values. Why is that? For example: sometimes I will add (a,b,c) into my List control box, but only (a) gets shown. But if i keep inserting an item, eventually the entry (a,b,c) will be added... >I have a list control with 3 columns. For some reason when I try ...

Problem with "Edit in Microsoft Office Project"
We have SharePoint 2007 implemented, and I am using MSO Project 2007. I have a document library in which I store a number of project documents, including the schedule. When I go to this document library and select "Edit in Microsoft Office Project", the file opens, but it always opens in Read Only mode. The only way I can open the file and have it editable is to check it out first, then select "Edit in Microsoft Office Project". And no, the document library is not configured to require check out. Any idea why this is? ...

Outlook 2003 rules problem on SBS 2003 server
About a month ago I lost the ability to create any new rules from client PCs running Outlook 2003, where a name from the global address list is being used. All the existing rules with GAL addresses work fine, and I am not getting any error messages, they simply do not work. All the computers are up to date, including the server. All the rules are of this variety: When message arrives from XYZ, file in folder ABC. Where the person who is XYZ is in the global address list. I am running the IMF filter. I did find the foillowing article which outlines my probem, however the solution does no...

Problem in Drawing Text with different Fonts & Charset
Dear all, I'm working in a program which will draw some string with both chinese and English character in the Window. I try to use CreateFont() to create a HFONT with Fonts "Arial" and CharSet "CHINESEBIG5_CHARSET" and then select the HFONT to the current DC. However the text drawing out isn't in Font "Arial" (It seems to be "Times New Roman" instead). After that, I try to use other available fonts on my platform, but the same outpur again. No matter what font I'm using, it give the same output!!! Does anyone know Why and how to fix it? ...

Import / DL problems
When I download my bank transactions, Money doesn't seem to grab it anymore. I used to see the pop up box that tells me I've received a file, and prompts me to place it in a certain acct. but now it just downloads it, and it doesn't import the transactions.(to any of my accounts). And it's not saving it anywhere on disk either, I did a search for any ofx file and returned nothing. What might it be? By the way, I've recently archived and removed all transactions from 2002 and 2003 from my working money file. Might this have caused some minor setting changes? Plz help?...

Excel formula problem SUMPRODUCT
Hi Guys, I have a problem with a formula adding up rows against 2 parameters. I am trying to add up rows on a report that 1) show that the actio against it is "open" and its target completion date is overdue. I have tried the following formula but it will not work. =SUMPRODUCT(--(H5:H47="OPEN")*(G5:G47="<TODAY())) This formula works if I substitute the date part with another tex parameter but will have nothing to do with dates even if I put in specific date that I know matches one from the column, I still get 0 Any ideas. Thanks in advance And -- Message ...

Item 'Last Ordered' Field updates inappropriately
The 'Last Ordered' field updates when I transfer inventory out. This is not good. If I want to know the last time I bought an item, the date of the most recent transfer does not help - especially if it was an inter-store transfer out. Ideally, separate fields for 'Last Transferred In' and Last Transferred Out' could be added as separate fields. This would reserve the 'Last Ordered' field for the last time the item was actually ordered from a supplier. Alternately, and better thant the present system, the field could simply update with purchase orders ONLY...

Problem importing data from text file
Hi, I have a comma delimited file that has twenty column names followed by six rows of data. I am trying to import this into Excel. When I do this, the data imports entirely into row one. It does import into difference cells but there is one row with 120 cells of data. I was expecting it two "Wrap" and start importing the data into cell A2. Can anyone help with this? How do I show the break between column headers and data? Thanks, Chuck ...

Refresh problem for the size grip with Windows XP style #2
Hi, I have a dialog application with a scrollbar size grip. On Windows XP with the visual style, there is a refresh problem for the size grip region when I move the application out of the screen; only if I go to the bottom of the screen. It's OK if I go out by the right side. Without the XP style, everything is OK. I have noticed the same behavior with Notepad. Do you know how could I solve this problem? Any ideas will be appreciated, Thanks It's a known problem in XP (non-client area is erased incorrectly between scrollbars). Will it ever get fixed? I would not bet on it. &qu...

TIME CRITICAL PROBLEM.
Hi Sorry about the length of this request but I feel it may be necessary to try to show what I would like to happen. I have a workbook with 6 worksheets. The sheets are called Nov 01, Feb 02, May 02, Aug 02, Nov 02 and Jan 03. Each sheet contains ID, name, address and loan details for individual clients. Some clients have loans on all month sheets and some may only have loans for a particular month sheet. What I need to happen is to conslidate all the loans onto one sheet but only show the clients name and address details once with all loans being in individual columns. Below are...

Pasting problems
I am using excel to link with another application (from which I am taking some data). The time to get this data can vary. If it finds the data in the time I have allowed for it, it will paste this perfectly into excel. If it does not find the data in time, I assume that it is trying to paste something which is not there. I get a runtime 1004 error Paste method of worksheet class failed. Is there anyway around this. Can I write a loop procedure to only try to paste once there is something in the clipboard. Any help would be much appreciated. Thanks Chip Pearson has some nice notes at:...

Simple Xpath question
I posted this to the wrong group. It went to m.p.dotnet.languages.vb. Ooops. -------------------------------------------------------------------- I have this tiny problem. I have learned that an xpath expression can be bounded by either single or double quotation marks. But sometimes I want to search for a title containing both a single and double quote. Any way to do this? The user enters the title, so now it is in a String variable. How can I dynamically construct the right Xpath query to find the book with that title. <book> <title>Who's your "Daddy"<...