forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am designing my own patient record database. I have a form for entering
patient data. The table from this form has a one to many relationship to a
table for patient treatment episodes. When I am entering data in the
treatment form I want to be able to see data from the patient data form in
read only format. The related field is a unique patient ID number. Help!
 
How are you "selecting" the patient so that you're entering data for the
correct patient? Assuming that you're using a combo box to select the
patient, one easy way to do what you ask is this:

Put textboxes on the form (where the combo box is located) -- as many
textboxes as you have different data for the patient to display. Lock and
disable each textbox.

For the combo box, be sure that all fields you want to display on the form
are in the combo box's RowSource query. They do not need to be visible in
the dropdown list of the combo box.

Then, for each textbox, use an expression similar to this as the
ControlSource for the textbox:
=[NameOfComboBox].[Column](x)

where x is the column number *minus 1* of the field to be displayed in the
combo box's RowSource (column is a zero-based property, so the first column
in the combo box's RowSource is Column(0), etc.).

See this article at The ACCESS Web for more info:
http://www.mvps.org/access/forms/frm0058.htm
 
Back
Top