Calculated fields (1 Viewer)

krass00

New member
Local time
Today, 10:50
Joined
May 13, 2013
Messages
3
Hello everyone

I have somewhat of a problem I would like to share. I have an Access 2007 database in which I have created a form to collect various medical data from 100s of patients. This data will not change, and the patients are deceased. On my form I have several calculated fields from other fields that I have collected, e.g. Survival time in days (Date of Diagnosis to Date of Demise), Age at Death (Date of Birth to Date of Demise).
Now that I am done collecting data I want to export the Table to Access to further analyze it. However, as everyone keeps telling me the rules of normalization say u cant store a value in table that is dependent on an other field yada yada. However, as I have explained above, this doesnt really apply in my case. Is there an easy way to store this data in the table? The calculations are only a few fields and I would rather get it over with quickly.
If not, do you have suggestions for creating a query/report that will show the calculations, and then export it etc?
Sorry for being such a Noob, havnt used Access in almost 10 years.

Much Appreciated
-Krass
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 03:50
Joined
Jan 20, 2009
Messages
12,851
Normalization still applies. Why store when a query can calculate the values in a derived field?

Simply use the same expression you used in the controls on the form but put them in field of the query. What comes out will look exactly like the table you think you want.

Hundreds of records is trivial task for Access to calculate the derived fields. You won't even notice the difference in processing time of the query versus the table.
 

catalin.petrut

Never knowing cleric
Local time
Today, 20:50
Joined
May 3, 2013
Messages
118
I don't understand: you have a access database and you want to export to access? How is that work?
Returning to your problem, i can say that normalization rule about calculated fields is more of a suggestion. Be more explicit about your export desire and you can get an advice about your problem.
 

krass00

New member
Local time
Today, 10:50
Joined
May 13, 2013
Messages
3
@catalin.petrut Im sorry I meant export to excel
 

krass00

New member
Local time
Today, 10:50
Joined
May 13, 2013
Messages
3
Thanks Galaxiom I did as you said and the query looks great. But when I try to export it to access the checkboxes show up as True/False. Is there a way to at least make them Yes/No?
Thanks!
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 03:50
Joined
Jan 20, 2009
Messages
12,851
The output can be modified by deriving a field instead of using the original one.

In the query designer define a field as:
somename: IIf([checkboxfield],"Yes","No")

However this will produce a string column with Yes or No in Excel. The TRUE / FALSE values are Boolean.
 

Users who are viewing this thread

Top Bottom