Opening one form based on 2 criteria in another form

  • Follow


I have a general form that contains patient information. In this form I can 
scroll through different exam dates for a particular patient. I need to be 
able to open a second form (for editing) based on two criteria, patient ID 
and exam visit date. 

I have used open args before to open a form when only one criteria was being 
passed, howeverm, I can't figure this one out. Any help would be appreciated.

Thanks.
0
Reply Utf 2/18/2010 5:38:01 AM

kejo41 wrote:
>I have a general form that contains patient information. In this form I can 
>scroll through different exam dates for a particular patient. I need to be 
>able to open a second form (for editing) based on two criteria, patient ID 
>and exam visit date. 
>
>I have used open args before to open a form when only one criteria was being 
>passed, howeverm, I can't figure this one out. Any help would be appreciated.
>
>Thanks.

You're opening this from a button, right?  Then in the button's click event,
you have something like

Sub cmdOpenSomeOtherForm_Click()
   Dim strFilter as string
   strFilter = "[PatientID]=" & Me.cboPatientID & " AND [ExamDate]=#" & me.
txtExamDate & "#"
   docmd.OpenForm "MyForm",acNormal,,strFilter,acFormEdit,acWindowNormal
End Sub

-- 
Message posted via http://www.accessmonster.com

0
Reply PieterLinden 2/18/2010 6:32:59 AM


1 Replies
577 Views

(page loaded in 0.045 seconds)

Similiar Articles:
















7/20/2012 11:05:51 PM


Reply: