The best way

  • Thread starter Thread starter Joe Holzhauer
  • Start date Start date
J

Joe Holzhauer

I'm completely self-taught, so I probably have some bad habits; this might
be one of them:

I have a form that requests a PatientID, which the user can enter or hit F2,
which pops up a search form allowing the user to find a patient by name or
other criteria. I've been having the popup form change the PatientID
textbox by referencing the textbox in code from the popup. It works well,
because this is the only place I need to search for a patient, but it seems
like bad form.

Is there a way to have my popup form "return" an ID (then have the main form
take the return value and manipulate it as needed)?
 
Hi Joe,

You'll be happy to know that there's an easy way - once you know it!

Make a copy of your form and fiddle with the below until you have what you
want. Destroy copies that blow up on you, make another copy and continue
.... When you have a copy doing what you want then rename your forms so that
the old form is the backup to your now modified form.

As you didn't tell us how your form requests the patientID, I'll proceed in
the blind.
Remove the text box into which you used to type the PatientID. With your
copy in design mode and with Wizards (wand and stars) enabled, choose the
combobox and create a combobox in the newly vacated space.. The wizard will
ask you what you want to do. You want to perform a record operation where
the PatientID is like the PatientID of the desired record. It will ask you
what fields you want in your cbo's query and will suggest hiding the
PatientID. Do it. I don't know if you were showing the patient's name
before you started changing things but you could leave that showing in the
combobox.

Once the wizard has finished you might want to change the comboboc'''s label
to read "Get Patient: ".

HTH
 
Are you saying I should use a combobox instead of a popup form?

I thought of doing that, but I'd like the user to be able to enter complex
search criteria (such as partial last name, first name only, partial
patientID, or any combination). To minimize retraining, I'm basically
emulating (but expanding enormously) the program they are using now, which
uses the F2 to pop up a search form...

You're right, I have a simple textbox on the main form to request a
patientID, but I don't think a combobox will have the functionality I want.
Is there any other way?

Thanks for your expertise!
Joe
 
Hi Joe,

First, I apologize for writing that you hadn't told us how you were
searching. You did but it wasn't complete enough for my feeble
understanding. Your later explanation cleared it up a bit.

I didn't say what you asked if I were saying. Your design is your business,
not to be dictated by me. :-) My response was to the issue of searching.
It didn't occur to me that you were trying to search on several fields. It
also seems that you and your users may have to search a few times to (maybe)
get the right record. I assumed that the patient's name and ID were in the
database already.

From what you describe it seems that you count yourself lucky if you get a
hit on the name. If you don't get a hit the first way you then try on bits
of the data that may yield a hit on this patient if the data you have
differs from the data in the database. How many tries do you make before
you give up and enter the new patient?

I can't think of another way that presents the same paradigm your users
already know.

HTH
 
Back
Top