Relationships

DavidGr

Registered User.
Local time
Today, 12:45
Joined
Nov 23, 2006
Messages
17
Please someone help! This is very urgent!

I am designing a database for a clinic

basically,

One Form is a Demographic Form, which was been designed. Each person was given an identifier code.

However, they all did 3 questionnaires. Each one of them has their ID code on it.

Is it possible for me to make a query so that when I search ID code, it actually brings up all the information on every questionnaire?
 
Please, I really need your help here! Someone has got to know

Plus, I have an additional query now and that is:

If you insert of formula into a form, such as one to determine age, how do you transfer that back to the tables because at the moment, while all the rest of the numbers are going back, the calculated ages etc are not!

PLEASE HELP!
 
query

In the criteria field of the query that contains the questionaire data set the criteria of the ID to whatever you want the search on. For instance, if you want to see the questionaire data for the person that has ID=3, the criteria field using the value of 3 will pull up just that person whose id=3.

Hope this helps.
 
I appreciate your help Rickster, however, I may have actually misguided you partly.

Basically, I created a table for a questionnaire regarding hip pain, and then I transformed it into a Form. Once I did that, I then used the following formula to convert the Date of Birth to Current Age.

=DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))

Unfortunately, while it does calculate this for me on the Form, it doesn't transcribe back to the table which means any queries I make concerning for example, Patient ID, Surname and Age, the Age would simply remain blank which is desperately frustrating. Is it because of the formula that I am using that the data isn't returning to the table?

Kind Regards,

David
 
age

In the After Update Event of the DOB textbox place your code such that

me.age=DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))


where age is the name of the textbox on your form whose data source is age in your table.
 
It actually is so it shouldn't be a problem I thought yet it still isn't updating, on the same token, for other calculations such as the sum ones, the forms do the maths and present it but back on the tables, its blank.
 
age

I am assuming that the data source of your form is the table that contains the DOB and age fields.

If you enter an age in your age field on that form does it save that info?

If that textbox's data source is Age then it should save the info.

Are you able to post your db or is it contain sensitive info?
 
I can't really post it, medical confidentiality.

Although I can clarify something for you and that is that the control source for the Age is the DOB score on the Form.

I just find it odd that everything updates from the form back to the tables from whence they came, yet anything that have a formula in it doesn't return. I've just realised this applies to everything. What I might have to do is create a second form (fake) just so you can see my point.

Just out of interest, if you put a relationship between two things, does Access then identify them as being the same thing, or does it just mean they are related...

Example:

Autotext number for Patient information

Patient No. 1, Name Jim

ANother Table

Patient No.1 scored 5 on question 2

if you say, query patient no (from table 1), surname, and question 2 score, it would give you

Patient 1
Jim
Question 2 - blank
 
Last edited:
source

The Data Source for the Age field on the form MUST be the Age field of your table otherwise nothing will get saved.
 

Users who are viewing this thread

Back
Top Bottom