Using a macro to create a textbox

W

WLMPilot

I have a database that I use to maintain patient information. This question
focuses on medical history.

I am going to have two different ways to input medical history (referred to
as hx).
One way will be to list common diseases and to click a checkbox next to the
appropriate disease. The second is to type in any other hx that is not
listed.

EXAMPLE:
checkbox1 = ESRD (End Stage Renal Disease)
checkbox2 = Alzheimers
checkbox3 = Dementia
etc., etc.

I want to "combine" all the items checked with any typed in during the print
phase of a patient's record. It may be necessary to limit the character
length of the field to 50. Therefore, I will probabably need three different
fields to place this information into.

I appreciate any help on this.

Thanks,
Les
 
D

Duane Hookom

It sounds like you are storing data in field names and creating a spreadsheet
rather than a relational table structure. ESRD, Alzheimers,... should be
values stored in fields, not field names.

Can you share your table and field names? You may need to either change your
structure or use a union query to normalize.
 
W

WLMPilot

You might get this twice. When I clicked "POST" to send my reply, I got a
"Page Unavailable".

I am sorry for the confusion. I will try to clarify for you.

The user, during data input, will see a screen that will allow input of
medical history. In an effort to cut down on how much information is being
stored to HD and to make it easier and quicker to enter information, I wish
to list several common illnesses and have a checkbox beside each. Since I
could not place a checkbox within this question to you, I typed it out, thus
the following is what you are seeing:

checkbox1 = ESRD (End Stage Renal Disease)
checkbox2 = Alzheimers
checkbox3 = Dementia

Since it is impossible to list everything and be efficient, I will also have
3 to 4 free-text fields to add a person's medical hx that I do not list.
Let's say the user checks all three checkboxes (listed for this example).
Then he free-texts the following hx: MI, CAD, CHF, COPD.

The database stores the value of checkbox1, 2 & 3 as either TRUE/FALSE. The
freetext fields will, of course, also be stored as typed.

Now comes my question: My report layout will have four fields, I will call
Hx1, Hx2, Hx3, Hx4. I need a macro that will automatically execute for each
patient, as it pulls the patient record in. The macro will need to place the
free-text in a variable, then look at the value of each checkbox. If the
checkbox is TRUE, it will add the appropriate description to the variable
holding the free-text. At this point, if you could look at the variable, it
should look like this:

MI, CAD, CHF, COPD, ESRD, Alzheimers, Dementia

It is very possible for a patient to have an extensive hx. If I limit the
field length of Hx1-Hx4 to 50, the macro will need to separate the above
variable information at the appropriate spot (if lenght > 50), ie after a
comma and place the first section in Hx1 and the next line of information (up
to 50 characters) in Hx2. So if the medical hx is 110 characters long, then
Hx1, Hx2, Hx3, will be utilized, again separating the information after a
comma and not in the middle of a word.

I hope this helps. Thanks for taking a shot at this!

Les
 
D

Duane Hookom

So far, my answer hasn't changed other than to further confirm your structure
is the issue.
Again:
Can you share your table and field names? You may need to either change your
structure or use a union query to normalize.
 
W

WLMPilot

Apparently, I am missing something. Let me do a little more research before
I come back with this issue.

Thanks again for your help.

Les
 

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