Look up record

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

I have two forms, one form enters new appointment dates
and the other form queries all of the appointments a
patient may already have. The second form allows me to see
if I can combine appointment that may be scheduled close
enough together.

What I am curently doing is copying the patient ID number
from new appointments form and then opening the
appointment look up form and copying the patient ID to be
able to query the patient's appointments in a Requery
field. What I would like to do is somehow press a button
on the new appointment form and open the look up form,
automaticaly referencing/quering the patient ID number
from current record of the new appointment form to the
look up form's Requery field.

How might I do something like this?

Thanks,

Dennis
 
Dennis said:
I have two forms, one form enters new appointment dates
and the other form queries all of the appointments a
patient may already have. The second form allows me to see
if I can combine appointment that may be scheduled close
enough together.

What I am curently doing is copying the patient ID number
from new appointments form and then opening the
appointment look up form and copying the patient ID to be
able to query the patient's appointments in a Requery
field.

By far the simplest approach would be to make the Appointments form a Subform of the patient form (perhaps on a second page of a Tab Control if you don't have enough screen space). Make the PatientID the Master/Child Link Field and it will fill in automatically - you don't need to even SEE it, much less enter it!
 
The way I am understanding your problem is that you are trying to ge
the lookup form to automatically display the records related to th
selected record on the mainform. Basically you are just synchronizin
the forms so you can either create a filter as I describe below or yo
can create the lookup form as a nested subform. Creating the looku
form as a nested subform will do exactly what I have done below it jus
uses a wizard.

In the lookup form's property box set the Filter t
[controlname]=[Forms]![formname]![controlname] Where the firs
controlname is the control on the lookup form and the second contro
name is the control on the mainform. Formname refers to the mainfor
in this case. Make sure that the AllowFilter is set to YES.

Good Luck
Shine
 
The way I am understanding your problem is that you are trying to ge
the lookup form to automatically display the records related to th
selected record on the mainform. Basically you are just synchronizin
the forms so you can either create a filter as I describe below or yo
can create the lookup form as a nested subform. Creating the looku
form as a nested subform will do exactly what I have done below it jus
uses a wizard.

In the lookup form's property box set the Filter t
[controlname]=[Forms]![formname]![controlname] Where the firs
controlname is the control on the lookup form and the second contro
name is the control on the mainform. Formname refers to the mainfor
in this case. Make sure that the AllowFilter is set to YES.

Good Luck
Shine
 
Back
Top