A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help!! I'm running around in circles!



 
 
Thread Tools Display Modes
  #1  
Old November 30th, 2004, 11:17 AM
CathyA
external usenet poster
 
Posts: n/a
Default Help!! I'm running around in circles!

I haven't used Access for since 1996 very much and have just undertaken a
project at work to computerise recording measurements on patients. Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a simple add new
record - or I can do it as part of the process of recording measurements.
The second step makes the database a little more complicated - there is a
different set of measurements to be taken depending on which part of the
patient is being treated - therefore a variety of separate forms/tables are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the report if I
already know the treatment area of the patient. I want to be able to do a
search of all patients as I can't assume that I or others will remember
patient specifics, then have the report generated from the appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in the first
place?
Thanks
  #2  
Old November 30th, 2004, 02:04 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

Not knowing the details of your data, the answer to (1) is "probably". If
your "measurements" data are in a separate table that is related to the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details about
your data and table structures. And what the report is supposed to produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just undertaken a
project at work to computerise recording measurements on patients.

Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a simple add

new
record - or I can do it as part of the process of recording measurements.
The second step makes the database a little more complicated - there is a
different set of measurements to be taken depending on which part of the
patient is being treated - therefore a variety of separate forms/tables

are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the report if I
already know the treatment area of the patient. I want to be able to do a
search of all patients as I can't assume that I or others will remember
patient specifics, then have the report generated from the appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in the first
place?
Thanks



  #3  
Old December 1st, 2004, 05:11 AM
CathyA
external usenet poster
 
Posts: n/a
Default

The only thing I need to know about patients in this particular database is:
Name, ID Number and area to be treated. The rest of the information about
treatment measurements etc is in the different tables - things like position
of body, bed height etc. When I run the report I want a prompt to open to
ask for the patient ID number and then I want the report to list everything -
name, number and all treatment measurements. I've worked out how to do this
using a query related to a specific treatment table (but I didn't have a
separate patient table at the time) but this would mean that the user would
have to know which area was being treated in the first place and they may not
always know this. So I want Access to be able to search all patient records
- that's why I've now separated out the patient details - and then print the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is "probably". If
your "measurements" data are in a separate table that is related to the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details about
your data and table structures. And what the report is supposed to produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just undertaken a
project at work to computerise recording measurements on patients.

Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a simple add

new
record - or I can do it as part of the process of recording measurements.
The second step makes the database a little more complicated - there is a
different set of measurements to be taken depending on which part of the
patient is being treated - therefore a variety of separate forms/tables

are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the report if I
already know the treatment area of the patient. I want to be able to do a
search of all patients as I can't assume that I or others will remember
patient specifics, then have the report generated from the appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in the first
place?
Thanks




  #4  
Old December 1st, 2004, 10:03 AM
Ed Warren
external usenet poster
 
Posts: n/a
Default

If you are from the United States,

You might want to consider HIPAA requirements here.
Recording patient data in a database is not for the faint hearted.

(tying Pt ID , Name ) are key identifiers!

The information lacking for to provide help is the data structure of the
downstream "treatment tables". Without knowing how these are organized we
cannot provide a path to enlightnment.

Example1:
tblPatient : Primary key on PtID
tblTreatment: Primary key on TreatmentID
tblPatient (PtID(K1), firstname, lastname, treatmentArea) 1 --M
tblTreatment (TreatmentID
(K1),PtID(F1),treatmentArea,DateTime,MeasurementTy pe,MeasurementValue)

Leads to one query

Whereas

Example2:
tblPatient : Primary key on PtID
tblTreatmentArea1: Primary key on Treatment1_ID
tblTreatmentArea2: Primary key on Treatment2_ID
tblTreatmentArea3: Primary key on Treatment3_ID

tblPatient (PtID(K1), firstname, lastname, treatmentArea) 1 --M
tblTreatmentArea 1(TreatmentArea1_ID
(K1),PtID(F1),DateTime,MeasurementType,Measurement Value)
tblPatient (PtID(K1), firstname, lastname, treatmentArea) 1 --M
tblTreatmentArea 2(TreatmentArea2_ID
(K1),PtID(F1),DateTime,MeasurementType,Measurement Value)
tblPatient (PtID(K1), firstname, lastname, treatmentArea) 1 --M
tblTreatmentArea 3(TreatmentArea3_ID
(K1),PtID(F1),DateTime,MeasurementType,Measurement Value)

Leads to a completly different query.

Ed Warren


"CathyA" wrote in message
...
The only thing I need to know about patients in this particular database
is:
Name, ID Number and area to be treated. The rest of the information about
treatment measurements etc is in the different tables - things like
position
of body, bed height etc. When I run the report I want a prompt to open to
ask for the patient ID number and then I want the report to list
everything -
name, number and all treatment measurements. I've worked out how to do
this
using a query related to a specific treatment table (but I didn't have a
separate patient table at the time) but this would mean that the user
would
have to know which area was being treated in the first place and they may
not
always know this. So I want Access to be able to search all patient
records
- that's why I've now separated out the patient details - and then print
the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is "probably". If
your "measurements" data are in a separate table that is related to the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details about
your data and table structures. And what the report is supposed to
produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just undertaken
a
project at work to computerise recording measurements on patients.

Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a simple
add

new
record - or I can do it as part of the process of recording
measurements.
The second step makes the database a little more complicated - there is
a
different set of measurements to be taken depending on which part of
the
patient is being treated - therefore a variety of separate forms/tables

are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the report if
I
already know the treatment area of the patient. I want to be able to
do a
search of all patients as I can't assume that I or others will remember
patient specifics, then have the report generated from the appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in the
first
place?
Thanks






  #5  
Old December 2nd, 2004, 02:25 AM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

I believe what you want to use is not one query to "find" all the records,
as you state it.

Instead, use a form with various subforms on it. The main form will display
the information from the patient table (the "main" table); each subform
displays the related records from the "child" tables. Display one table in
each subform.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
The only thing I need to know about patients in this particular database

is:
Name, ID Number and area to be treated. The rest of the information about
treatment measurements etc is in the different tables - things like

position
of body, bed height etc. When I run the report I want a prompt to open to
ask for the patient ID number and then I want the report to list

everything -
name, number and all treatment measurements. I've worked out how to do

this
using a query related to a specific treatment table (but I didn't have a
separate patient table at the time) but this would mean that the user

would
have to know which area was being treated in the first place and they may

not
always know this. So I want Access to be able to search all patient

records
- that's why I've now separated out the patient details - and then print

the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is "probably".

If
your "measurements" data are in a separate table that is related to the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details

about
your data and table structures. And what the report is supposed to

produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just

undertaken a
project at work to computerise recording measurements on patients.

Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a simple

add
new
record - or I can do it as part of the process of recording

measurements.
The second step makes the database a little more complicated - there

is a
different set of measurements to be taken depending on which part of

the
patient is being treated - therefore a variety of separate

forms/tables
are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the report

if I
already know the treatment area of the patient. I want to be able to

do a
search of all patients as I can't assume that I or others will

remember
patient specifics, then have the report generated from the appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in the

first
place?
Thanks






  #6  
Old December 3rd, 2004, 06:07 AM
CathyA
external usenet poster
 
Posts: n/a
Default

This sounds like a good idea - a bit simpler maybe than what I was trying to
do with the reports.
I've been experimenting with forms like this using the auto form wizard.
Will this display the child form depending on what treatment area is selected
(ie a different subform if chest is selected rather than leg)? (I haven't got
very far with experimenting yet!! ). Can this be printed off easily as the
report.
One thing I noticed though is that the Wizard changes the tick boxes to
"Yes" and "No" - is there any way to keep the tick boxes etc. I assume I can
change the layout like I can in a form or report setup.
Thanks for your help.
Cathy

"Ken Snell [MVP]" wrote:

I believe what you want to use is not one query to "find" all the records,
as you state it.

Instead, use a form with various subforms on it. The main form will display
the information from the patient table (the "main" table); each subform
displays the related records from the "child" tables. Display one table in
each subform.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
The only thing I need to know about patients in this particular database

is:
Name, ID Number and area to be treated. The rest of the information about
treatment measurements etc is in the different tables - things like

position
of body, bed height etc. When I run the report I want a prompt to open to
ask for the patient ID number and then I want the report to list

everything -
name, number and all treatment measurements. I've worked out how to do

this
using a query related to a specific treatment table (but I didn't have a
separate patient table at the time) but this would mean that the user

would
have to know which area was being treated in the first place and they may

not
always know this. So I want Access to be able to search all patient

records
- that's why I've now separated out the patient details - and then print

the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is "probably".

If
your "measurements" data are in a separate table that is related to the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details

about
your data and table structures. And what the report is supposed to

produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just

undertaken a
project at work to computerise recording measurements on patients.
Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a simple

add
new
record - or I can do it as part of the process of recording

measurements.
The second step makes the database a little more complicated - there

is a
different set of measurements to be taken depending on which part of

the
patient is being treated - therefore a variety of separate

forms/tables
are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the report

if I
already know the treatment area of the patient. I want to be able to

do a
search of all patients as I can't assume that I or others will

remember
patient specifics, then have the report generated from the appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in the

first
place?
Thanks






  #7  
Old December 3rd, 2004, 06:57 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

A subform will display on the form if it has any records. If you put more
than one subform on the form, each will display independently.

It's possible to make a subform visible or not visible if you use a macro or
VBA code to change that property of the control that holds the subform; you
can base this on a variety of possible values.

You can have subreports in a report -- they are similar to subforms on
forms.

I'm not understanding what you mean by the wizard changing the tick boxes?
Can you give me more info?

--

Ken Snell
MS ACCESS MVP


"CathyA" wrote in message
...
This sounds like a good idea - a bit simpler maybe than what I was trying

to
do with the reports.
I've been experimenting with forms like this using the auto form wizard.
Will this display the child form depending on what treatment area is

selected
(ie a different subform if chest is selected rather than leg)? (I haven't

got
very far with experimenting yet!! ). Can this be printed off easily as

the
report.
One thing I noticed though is that the Wizard changes the tick boxes to
"Yes" and "No" - is there any way to keep the tick boxes etc. I assume I

can
change the layout like I can in a form or report setup.
Thanks for your help.
Cathy

"Ken Snell [MVP]" wrote:

I believe what you want to use is not one query to "find" all the

records,
as you state it.

Instead, use a form with various subforms on it. The main form will

display
the information from the patient table (the "main" table); each subform
displays the related records from the "child" tables. Display one table

in
each subform.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
The only thing I need to know about patients in this particular

database
is:
Name, ID Number and area to be treated. The rest of the information

about
treatment measurements etc is in the different tables - things like

position
of body, bed height etc. When I run the report I want a prompt to

open to
ask for the patient ID number and then I want the report to list

everything -
name, number and all treatment measurements. I've worked out how to

do
this
using a query related to a specific treatment table (but I didn't have

a
separate patient table at the time) but this would mean that the user

would
have to know which area was being treated in the first place and they

may
not
always know this. So I want Access to be able to search all patient

records
- that's why I've now separated out the patient details - and then

print
the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is

"probably".
If
your "measurements" data are in a separate table that is related to

the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details

about
your data and table structures. And what the report is supposed to

produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just

undertaken a
project at work to computerise recording measurements on patients.
Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a

simple
add
new
record - or I can do it as part of the process of recording

measurements.
The second step makes the database a little more complicated -

there
is a
different set of measurements to be taken depending on which part

of
the
patient is being treated - therefore a variety of separate

forms/tables
are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the

report
if I
already know the treatment area of the patient. I want to be able

to
do a
search of all patients as I can't assume that I or others will

remember
patient specifics, then have the report generated from the

appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in

the
first
place?
Thanks








  #8  
Old December 6th, 2004, 04:57 AM
CathyA
external usenet poster
 
Posts: n/a
Default

OK. So how do I do that? !! This is the part that I don't fully
understand how to do in Access, so please forgive my ignorance.
What I want to be able to do when the user presses the "Print" button is this:
I want a dialog box to open and ask for the patients ID number. Then, I
want the dialog box to show extra patient details (ie name and treatment
area) based on that ID number so that the user can verify it's the right
patient. Then they say OK to print or cancel. When OK is pressed, ideally I
would like access to look at the treatment area (the three I have set up so
far is chest, pelvis and other) and then print the linked treatment setup.
What I'm basically getting at is, can I put something like an IF statement in
the coding behind the OK button that says something like IF treatment area =
chest, then print the chest report/form (whichever works best in this
situation) for this patient. Then that will open say a report based on a
query that links the patient details and chest treatment details.
Do you think this would work??? If should work, I have no idea about how
the programming side of things should be done - could you give instructions
on how to insert the IF statement - where, what it should say etc??
I think that's really the crux of what I'm after - whether an IF statement
will do this - I think I should be able to fit it into either a subreport or
subform situation.
Thanks for all your help
Cathy

"Ken Snell [MVP]" wrote:

A subform will display on the form if it has any records. If you put more
than one subform on the form, each will display independently.

It's possible to make a subform visible or not visible if you use a macro or
VBA code to change that property of the control that holds the subform; you
can base this on a variety of possible values.

You can have subreports in a report -- they are similar to subforms on
forms.

I'm not understanding what you mean by the wizard changing the tick boxes?
Can you give me more info?

--

Ken Snell
MS ACCESS MVP


"CathyA" wrote in message
...
This sounds like a good idea - a bit simpler maybe than what I was trying

to
do with the reports.
I've been experimenting with forms like this using the auto form wizard.
Will this display the child form depending on what treatment area is

selected
(ie a different subform if chest is selected rather than leg)? (I haven't

got
very far with experimenting yet!! ). Can this be printed off easily as

the
report.
One thing I noticed though is that the Wizard changes the tick boxes to
"Yes" and "No" - is there any way to keep the tick boxes etc. I assume I

can
change the layout like I can in a form or report setup.
Thanks for your help.
Cathy

"Ken Snell [MVP]" wrote:

I believe what you want to use is not one query to "find" all the

records,
as you state it.

Instead, use a form with various subforms on it. The main form will

display
the information from the patient table (the "main" table); each subform
displays the related records from the "child" tables. Display one table

in
each subform.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
The only thing I need to know about patients in this particular

database
is:
Name, ID Number and area to be treated. The rest of the information

about
treatment measurements etc is in the different tables - things like
position
of body, bed height etc. When I run the report I want a prompt to

open to
ask for the patient ID number and then I want the report to list
everything -
name, number and all treatment measurements. I've worked out how to

do
this
using a query related to a specific treatment table (but I didn't have

a
separate patient table at the time) but this would mean that the user
would
have to know which area was being treated in the first place and they

may
not
always know this. So I want Access to be able to search all patient
records
- that's why I've now separated out the patient details - and then

print
the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is

"probably".
If
your "measurements" data are in a separate table that is related to

the
patients table, then a query could be written that returns all the
measurements for a patient. But you'll need to give us more details
about
your data and table structures. And what the report is supposed to
produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just
undertaken a
project at work to computerise recording measurements on patients.
Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a

simple
add
new
record - or I can do it as part of the process of recording
measurements.
The second step makes the database a little more complicated -

there
is a
different set of measurements to be taken depending on which part

of
the
patient is being treated - therefore a variety of separate
forms/tables
are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the

report
if I
already know the treatment area of the patient. I want to be able

to
do a
search of all patients as I can't assume that I or others will
remember
patient specifics, then have the report generated from the

appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way in

the
first
place?
Thanks









  #9  
Old December 6th, 2004, 02:04 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

From your description, it appears that you'd have a separate report form for
chest, for pelvic, and so on? You wouldn't have a single report that would
display the test results on it for all the tests?

What I'm suggesting (we'll get to code in next exchange) is that you create
a report that has a subreport for each possible test type IF they would need
different report layouts for each test. If each test can be represented by
the same report format, then just a single subreport would be needed; the
report will be able to generate separate "sections" for each test.

When you would run the report, if there are no test results for a specific
test, nothing would print for that test. This can be done using the normal
report setup and doesn't require code at all.

What you describe for a dialog box and such is straightforward and fairly
easy to implement. But before we get to that, I want to understand what you
are thinking for the report format/setup/layout.

--

Ken Snell
MS ACCESS MVP


"CathyA" wrote in message
...
OK. So how do I do that? !! This is the part that I don't fully
understand how to do in Access, so please forgive my ignorance.
What I want to be able to do when the user presses the "Print" button is

this:
I want a dialog box to open and ask for the patients ID number. Then, I
want the dialog box to show extra patient details (ie name and treatment
area) based on that ID number so that the user can verify it's the right
patient. Then they say OK to print or cancel. When OK is pressed,

ideally I
would like access to look at the treatment area (the three I have set up

so
far is chest, pelvis and other) and then print the linked treatment setup.
What I'm basically getting at is, can I put something like an IF statement

in
the coding behind the OK button that says something like IF treatment area

=
chest, then print the chest report/form (whichever works best in this
situation) for this patient. Then that will open say a report based on a
query that links the patient details and chest treatment details.
Do you think this would work??? If should work, I have no idea about how
the programming side of things should be done - could you give

instructions
on how to insert the IF statement - where, what it should say etc??
I think that's really the crux of what I'm after - whether an IF statement
will do this - I think I should be able to fit it into either a subreport

or
subform situation.
Thanks for all your help
Cathy

"Ken Snell [MVP]" wrote:

A subform will display on the form if it has any records. If you put

more
than one subform on the form, each will display independently.

It's possible to make a subform visible or not visible if you use a

macro or
VBA code to change that property of the control that holds the subform;

you
can base this on a variety of possible values.

You can have subreports in a report -- they are similar to subforms on
forms.

I'm not understanding what you mean by the wizard changing the tick

boxes?
Can you give me more info?

--

Ken Snell
MS ACCESS MVP


"CathyA" wrote in message
...
This sounds like a good idea - a bit simpler maybe than what I was

trying
to
do with the reports.
I've been experimenting with forms like this using the auto form

wizard.
Will this display the child form depending on what treatment area is

selected
(ie a different subform if chest is selected rather than leg)? (I

haven't
got
very far with experimenting yet!! ). Can this be printed off easily

as
the
report.
One thing I noticed though is that the Wizard changes the tick boxes

to
"Yes" and "No" - is there any way to keep the tick boxes etc. I

assume I
can
change the layout like I can in a form or report setup.
Thanks for your help.
Cathy

"Ken Snell [MVP]" wrote:

I believe what you want to use is not one query to "find" all the

records,
as you state it.

Instead, use a form with various subforms on it. The main form will

display
the information from the patient table (the "main" table); each

subform
displays the related records from the "child" tables. Display one

table
in
each subform.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
The only thing I need to know about patients in this particular

database
is:
Name, ID Number and area to be treated. The rest of the

information
about
treatment measurements etc is in the different tables - things

like
position
of body, bed height etc. When I run the report I want a prompt to

open to
ask for the patient ID number and then I want the report to list
everything -
name, number and all treatment measurements. I've worked out how

to
do
this
using a query related to a specific treatment table (but I didn't

have
a
separate patient table at the time) but this would mean that the

user
would
have to know which area was being treated in the first place and

they
may
not
always know this. So I want Access to be able to search all

patient
records
- that's why I've now separated out the patient details - and then

print
the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is

"probably".
If
your "measurements" data are in a separate table that is related

to
the
patients table, then a query could be written that returns all

the
measurements for a patient. But you'll need to give us more

details
about
your data and table structures. And what the report is supposed

to
produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just
undertaken a
project at work to computerise recording measurements on

patients.
Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a

simple
add
new
record - or I can do it as part of the process of recording
measurements.
The second step makes the database a little more complicated -

there
is a
different set of measurements to be taken depending on which

part
of
the
patient is being treated - therefore a variety of separate
forms/tables
are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the

report
if I
already know the treatment area of the patient. I want to be

able
to
do a
search of all patients as I can't assume that I or others will
remember
patient specifics, then have the report generated from the

appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way

in
the
first
place?
Thanks











  #10  
Old December 7th, 2004, 12:15 AM
CathyA
external usenet poster
 
Posts: n/a
Default

I'd assumed that I would need separate report forms because there are
different forms for each treatment. Each treatment will have a slightly
different layout because they have different numbers of fields - for example,
I think chest has about 30 fields wheras pelvis has about 20. If it can be
done on the one report with different subreports for each treatment area that
would seem to be better - so long as I can set it so that it doesn't leave
whole blank areas where the other subreports are that aren't relevant to the
patient.
Does this help you? How do you think it's best to set it all up?
Thanks,
Cathy

"Ken Snell [MVP]" wrote:

From your description, it appears that you'd have a separate report form for
chest, for pelvic, and so on? You wouldn't have a single report that would
display the test results on it for all the tests?

What I'm suggesting (we'll get to code in next exchange) is that you create
a report that has a subreport for each possible test type IF they would need
different report layouts for each test. If each test can be represented by
the same report format, then just a single subreport would be needed; the
report will be able to generate separate "sections" for each test.

When you would run the report, if there are no test results for a specific
test, nothing would print for that test. This can be done using the normal
report setup and doesn't require code at all.

What you describe for a dialog box and such is straightforward and fairly
easy to implement. But before we get to that, I want to understand what you
are thinking for the report format/setup/layout.

--

Ken Snell
MS ACCESS MVP


"CathyA" wrote in message
...
OK. So how do I do that? !! This is the part that I don't fully
understand how to do in Access, so please forgive my ignorance.
What I want to be able to do when the user presses the "Print" button is

this:
I want a dialog box to open and ask for the patients ID number. Then, I
want the dialog box to show extra patient details (ie name and treatment
area) based on that ID number so that the user can verify it's the right
patient. Then they say OK to print or cancel. When OK is pressed,

ideally I
would like access to look at the treatment area (the three I have set up

so
far is chest, pelvis and other) and then print the linked treatment setup.
What I'm basically getting at is, can I put something like an IF statement

in
the coding behind the OK button that says something like IF treatment area

=
chest, then print the chest report/form (whichever works best in this
situation) for this patient. Then that will open say a report based on a
query that links the patient details and chest treatment details.
Do you think this would work??? If should work, I have no idea about how
the programming side of things should be done - could you give

instructions
on how to insert the IF statement - where, what it should say etc??
I think that's really the crux of what I'm after - whether an IF statement
will do this - I think I should be able to fit it into either a subreport

or
subform situation.
Thanks for all your help
Cathy

"Ken Snell [MVP]" wrote:

A subform will display on the form if it has any records. If you put

more
than one subform on the form, each will display independently.

It's possible to make a subform visible or not visible if you use a

macro or
VBA code to change that property of the control that holds the subform;

you
can base this on a variety of possible values.

You can have subreports in a report -- they are similar to subforms on
forms.

I'm not understanding what you mean by the wizard changing the tick

boxes?
Can you give me more info?

--

Ken Snell
MS ACCESS MVP


"CathyA" wrote in message
...
This sounds like a good idea - a bit simpler maybe than what I was

trying
to
do with the reports.
I've been experimenting with forms like this using the auto form

wizard.
Will this display the child form depending on what treatment area is
selected
(ie a different subform if chest is selected rather than leg)? (I

haven't
got
very far with experimenting yet!! ). Can this be printed off easily

as
the
report.
One thing I noticed though is that the Wizard changes the tick boxes

to
"Yes" and "No" - is there any way to keep the tick boxes etc. I

assume I
can
change the layout like I can in a form or report setup.
Thanks for your help.
Cathy

"Ken Snell [MVP]" wrote:

I believe what you want to use is not one query to "find" all the
records,
as you state it.

Instead, use a form with various subforms on it. The main form will
display
the information from the patient table (the "main" table); each

subform
displays the related records from the "child" tables. Display one

table
in
each subform.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
The only thing I need to know about patients in this particular
database
is:
Name, ID Number and area to be treated. The rest of the

information
about
treatment measurements etc is in the different tables - things

like
position
of body, bed height etc. When I run the report I want a prompt to
open to
ask for the patient ID number and then I want the report to list
everything -
name, number and all treatment measurements. I've worked out how

to
do
this
using a query related to a specific treatment table (but I didn't

have
a
separate patient table at the time) but this would mean that the

user
would
have to know which area was being treated in the first place and

they
may
not
always know this. So I want Access to be able to search all

patient
records
- that's why I've now separated out the patient details - and then
print
the
associated treatment details.
Thanks

"Ken Snell [MVP]" wrote:

Not knowing the details of your data, the answer to (1) is
"probably".
If
your "measurements" data are in a separate table that is related

to
the
patients table, then a query could be written that returns all

the
measurements for a patient. But you'll need to give us more

details
about
your data and table structures. And what the report is supposed

to
produce.
--

Ken Snell
MS ACCESS MVP



"CathyA" wrote in message
...
I haven't used Access for since 1996 very much and have just
undertaken a
project at work to computerise recording measurements on

patients.
Basically
what will need to happen is:
1 - To add a new patient
2 - To add the measurements
3 - To print a report
I can do the first step ok - I can do it either by itself - a
simple
add
new
record - or I can do it as part of the process of recording
measurements.
The second step makes the database a little more complicated -
there
is a
different set of measurements to be taken depending on which

part
of
the
patient is being treated - therefore a variety of separate
forms/tables
are
needed to compensate. I can set these up ok.
The problem is this - I can only work out how to generate the
report
if I
already know the treatment area of the patient. I want to be

able
to
do a
search of all patients as I can't assume that I or others will
remember
patient specifics, then have the report generated from the
appropriate
treatment information.
Does this make sense??
My questions are this:
1 - Is there a way of generating a report like this?
2 - Have I even set up the database in the most efficient way

in
the
first
place?
Thanks












 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
report / running sum and sorting Wim Foblets General Discussion 1 October 6th, 2004 02:11 PM
Running Sum Tom Setting Up & Running Reports 5 September 20th, 2004 07:51 PM
Rule won't run unless Outlook is running Edwin E. Smith General Discussion 2 September 11th, 2004 02:56 AM
Installing Outook 2003 over Exhange Server Based Client running Win2K Prof and Office 2000 joe smith Installation & Setup 3 June 9th, 2004 03:44 PM
Running Excel vba within IE Dave Peterson Setting up and Configuration 10 March 25th, 2004 01:38 PM


All times are GMT +1. The time now is 10:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.