Autofilling a form

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

Guest

So I am really new to Access and have what is probably a simple question.
Basically, I am a nurse working in a hospital. I want to enter pt. data into
the database and then create various reports from that data. My issue is
with the data entry. Each pt is identified by a unique hospital ID number
which is assigned as the primary key. From there I have several fields such
as lastname, firstname, phsyician, diagnosis, etc. I have created a form
with all of these items in it so I can enter the data. What I want to do is
open my form and in the hospital id box type in a previously entered id and
have it autofill all the rest of the information. This would easily allow
people to go back and change or add information at a later time. At the
present when I type in a hospital id number that is already in use I just get
an error saying I am duplicating a primary key. I have seached and searched
and am at a loss for how to do this. I hope this makes sense and appreciate
any assistance. Thanks!

NooB
 
This may get you what you want:

Open a copy of your form in design view. Show Header and Footer if
not already showing. Drag down the bottom of the header window
sufficient for the addition of a new control. Make sure that wizards
are turned on. click on the combobox icon and draw your combobox in
the header area. Answer the wizard's questions. You want to go to a
particular record.... You do not want to hide the ID field.

Make the name of your new combobox "cboFindPatient" you don't need to
use arcane abbreviations in your designs nor in your descriptions of
them in these newsgroups. Tell the wizard to exit to form design.
Open the Properties for cboFindPatient and set its Autoexpand property
On.

With the form open in run mode, start typing a record key into the
combobox. The Autoexpand feature will cause the first record that
matches the string you've already typed to be shown in the combobox.

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

Back
Top