Linking Forms

A

ANelson

Thank you for your help in advance

Well, I'm new to Access so any explanation may have to be worded in simple
language, but anyway...

Okay, I've created several forms which all have the field "patientid." Now
what I've done is put each form on its own tab on a larger form so the user
can scroll through each form easily, through the tabs. However, when
scrolling through the tabs the user will need to search the "patientid" field
on each form.

What I would like to do is be able to enter the Patient's ID in the
"patientid" field in the first form tab, and then have Access retrieve the
information on the same patient (via their "patientid" field) on each of the
forms on the tabs.

Does this make sense? Can it be done?

Again, thank you for your help.
 
D

Doogle

Hi from the UK

Two possible solutions spring to mind (OK, I've been doing Access for too
long maybe...) One involves keeping the subforms as they are; the other keeps
the forms looking as they are as far as the user is concerned, but actually
has the query linked to the main form itself. With me so far?

OK, plan one.

Add a drop-down (or 'combo') box on the main form, maybe above the tabbed
pages. Give it two columns, and set its query to show the patient's name in
the first column and the patientID in the second. Make sure the 'Bound
column' is set to 2. Let's say this combo is named 'cboPatientName'. Then for
each of the subforms, set their 'Link Master fields' to 'cboPatientName' and
'Link Child Fields' to 'PatientID'. So as you select a different patient, all
the subforms will change to display their info.

Having said all that I prefer plan two! I'm assuming that the patient info
is all on a large table, that you've split into subforms on the tabbed pages
to make it better for the user than scrolling down or across a form that's
too big for the screen. I like to do this too (and so do my clients, which is
the best reason!)

So, make the table the data source for the main form itself. Then, create a
new tabbed page for each of the tabbed pages you currently have, and just
copy and paste all the fields from each existing subform onto one of the
blank new pages, so now they're part of the main form. Once you've copied
them all, you can delete the original tabbed pages with their subforms.

Helpful? Please let me know!

As an aside, to show that Access doesn't dominate my entire life(!!), I
noticed your name. Did you know that this year is the 200th anniversary of
the British Admiral Lord Nelson's famous victory (and death) at the battle of
Trafalgar?

Best wishes
 

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