Copying data from one field to another

P

Palazo

I'm having some problems with the following:

I have two tables:

Table ICD9 contains the following fields:

ICDNumber
ICDDesc

Table DxList contains the following fields:
IDNumber
EpisodeNumber
ICDDx

I have a main form with two subforms in it.

Subform DxList is set up as continuous forms
Subform ICD9 is setup as DATASHEET for the default view

What I would like to do is have the user be able to select a record
from the ICD9 subform and then hit a button to copy the current record
to a new record in the DxLIST subform.
Once this is done, the user can then scroll through the ICD9 subform
and should be able to select another record and copy it to a new record
in the dxlist subform.

In other words, the user should be able to populate the dxlist subform
with user selected records from the ICD9 subform.

Can anybody help?
 
L

Larry Daugherty

First, please post back with a description of what you are trying to
accomplish with your application in real-world terms.

Most likely you'll receive suggestions about changing your approach
but that will help you achieve your real-world goals. The first clue
that this might be so is that you are trying to copy data from one
place in your application to another place in the same application.
In the context of a relational database that just isn't the way to go.
However, you can display your data in many different ways if your
schema is correct.

Welcome to the wonderful world of Access. You can do lots of great
things with it if you're willing to put in the time and effort.
You'll find many of the concepts new. Some seem incomprehensible. Be
comforted by the awareness that the Access learning curve is long and
steep..

While you'll find friendly and courteous and FREE help in all of the
Access newsgroups, a couple of great newsgroups for those just getting
started are:

microsoft.public.access.gettingstarted
microsoft.public.access.tablesdesign

An incredibly useful site is www.mvps.org/access It is full of Access
lore and useful to developers at all levels.

HTH
 
P

Palazo

Thanks for the quick reply.....

To clarify, here is what I am trying to do.

Each time a patient comes into the office, he carries a diagnosis.

For each visit, I want to track the diagnosis.

For instance, if he comes in today, the diagnosis may be cellulitis
If he comes in a week from now, the diagnosis may be headache

These diagnoses are all specified in something called ICD-9 codes.
There are over 10,000 of them.

My MasterForm is called frmDiagnosis
In the header of the form, I have IDNumber, PName, PDOB
IDnumber is generated via AutoNumber

On frmDiagnosis, I have placed to subforms

frmdxlist
frmicd9

frmdxlist is a running list of the patients diagnoses during this visit
and all previous visits and contains the following fields
date
icddx

frmicd9 contains the 10,000 diagnoses with the following fields:
ICDNumber
ICDDesc

What I want is to have subform frmicd9 display all of the 10,000
ICDNumber with the corresponding ICDDesc on master form frmDiagnosis

Then I want to be able to scroll through the list on the subform
frmicd9, highlight a record and then click on select

Clicking on Select should copy the contents of field ICDDesc to field
icddx in a new record on subform frmdxlist.

Once this is done, I should be able to scroll through subform frmicd9
again and select another diagnosis to copy if I need too.

I realize that I could set up field ICDDx to be a combo box that
lookups all possible 10,000 icd9 codes from a table. But I want to do
it the above mentioned way because I want to setup frmicd9 in datasheet
view and have a box on top where I can type in part of diagnoses and it
filters the datasheet to show only matching records.

For example, if I type in pneumonia, it narrows the listed records on
frmicd9 to approximately 10 from 10000.

I hope this explains what I am trying to do.
 
L

Larry Daugherty

Your clarification seemed to clear up a part of the ambiguity but then
layered in some more. My comments interspersed in your reply.



Palazo said:
Thanks for the quick reply.....

To clarify, here is what I am trying to do.

Each time a patient comes into the office, he carries a diagnosis.

On first reading I took this to mean that the diagnosis was
performed elsewhere with the Reason for Visit to you already resolved
as an ICD code.
For each visit, I want to track the diagnosis.

For instance, if he comes in today, the diagnosis may be cellulitis
If he comes in a week from now, the diagnosis may be headache

These diagnoses are all specified in something called ICD-9 codes.
There are over 10,000 of them.

My MasterForm is called frmDiagnosis
In the header of the form, I have IDNumber, PName, PDOB
IDnumber is generated via AutoNumber

On frmDiagnosis, I have placed to subforms

frmdxlist
frmicd9

frmdxlist is a running list of the patients diagnoses during this visit
and all previous visits and contains the following fields
date
icddx

frmicd9 contains the 10,000 diagnoses with the following fields:
ICDNumber
ICDDesc

What I want is to have subform frmicd9 display all of the 10,000
ICDNumber with the corresponding ICDDesc on master form frmDiagnosis

Then I want to be able to scroll through the list on the subform
frmicd9, highlight a record and then click on select

Clicking on Select should copy the contents of field ICDDesc to field
icddx in a new record on subform frmdxlist.

Once this is done, I should be able to scroll through subform frmicd9
again and select another diagnosis to copy if I need too.

I realize that I could set up field ICDDx to be a combo box that
lookups all possible 10,000 icd9 codes from a table. But I want to do
it the above mentioned way because I want to setup frmicd9 in datasheet
view and have a box on top where I can type in part of diagnoses and it
filters the datasheet to show only matching records.

For example, if I type in pneumonia, it narrows the listed records on
frmicd9 to approximately 10 from 10000.

I hope this explains what I am trying to do.
It doesn't. because it isn't clear to me what you know and when
you know it.

If the patient comes to you and you make the diagnosis then things
work one way (which seems it may be the way things work for you).
Yep, go ahead and enter the phrase you want and return your list of
candidates. Choose the correct candidate. In the AfterUpdate event
of choosing your diagnosis, write the Primary Key of the ICD9 code
record into the ICD9 code field of the table underlying your form.
Whether you actually write the ICD9 code's description to the patient
record in the table depends entirely on what you're going to do with
the information. If you absolutely must write it into the patient's
file then do so. Consider carefully that while you are looking at it
with your Access application you can always look it up and just
display the description in an unbound textbox, you don't need to use
up all that space re-writing that same description every time you use
the code. Just display it. If you are creating printed exam
transcripts then the description can be looked up and printed in the
report or in the Word document if you're sending the output over
there.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top