A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Opening one form based on 2 criteria in another form



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2010, 06:38 AM posted to microsoft.public.access.forms
kejo41
external usenet poster
 
Posts: 10
Default Opening one form based on 2 criteria in another form

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.
  #2  
Old February 18th, 2010, 07:32 AM posted to microsoft.public.access.forms
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Opening one form based on 2 criteria in another form

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,acWindowNo rmal
End Sub

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.