Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Criteria Problem linking forms

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi,

I have a continuous form which displays a count of all records for all LineManagers in my database, I have six different columns depending on the AbsenceType's (sick, awol, late, etc)
If I double click on the total column the desired form opens up with all the records for the LineManager

using this

Code:
stDocName = "frmOpenCaseSummaries"
stLinkCriteria = "[LineManager]=" & "'" & Me![LineManager] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

I am struggling to get the multiple criteria working to show me only records based on the type of absence, the type of absence box only shows the count of records matching the LineManager and not a name of the absence, and I cant get the criteria to work, below are a few examples of what i have tried and I get

type mismatch
Code:
stDocName = "frmOpenCaseSummaries"
    
    stLinkCriteria = "[LineManager]=" & "'" & Me![LineManager] & "'" And "[Absencetype]=" & "'" & Me![Text59] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
i entered the text value I wanted to appear in a seperate box to try and get the absencetype to work.

Missing operator

Code:
stLinkCriteria = "[LineManager]='" & Me.LineManager & "[Absencetype]='" & Me.Text59 & "'"
i have set text59 to show Sickness but still wont load the form.

I have been going round and round in circles on this.





Hope this is of use, Rob.[yoda]
 
What about this ?
Code:
stLinkCriteria = "LineManager='" & Me!LineManager & "' And Absencetype='" & Me!Text59 & "'"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
i'll try that tomorrow when I am next in the office

Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top