Full Version: Open A Details Form Based On Two Criteria
UtterAccess Discussion Forums > Microsoft® Access > Access Q and A
josephbupe
Hi,

I need help to open a details form based on two criteria.

What I have is a form with a treeview control desplaying a hierrachy relationship between parent nodes (Persons Names) and child nodes (Offences).

Selecting an Offence under a particular person reveals some offence's details on the other side of the form where I now wan't to include a button to opend a pop up form linked to that particular offence (PersonOffenceID)

Initially, the following would only open a form based on one criterial (PersonsID); so I what to include in it another criteria for PersonOffenceID

CODE
stLinkCriteria = "[PersonID]=" & Me![PersonID]


I will appreciate your help.

josephbupe
Doug Steele
CODE
stLinkCriteria = "[PersonID]=" & Me![PersonID] & " AND [PersonOffenceID] = " & Me![PersonOffenceID]



josephbupe
Thank you Doug.

It worked very well.

Warm regards.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.