Hello Rob,

DoCmd.OpenForm "MyForm", , , "OneField = 10 AND OtherField = 5"

You can change the criteria to whatever you want. The point is that 
the open form statement has lots of parts to it. The part I'm using 
here is like the WHERE statement in a query. You can use the AND 
operator if you want both parts to be true or you can use the OR 
operator if you want either part to be true.

Hope I haven't confused you.
Regards
Robin.



--- In [email protected], "linders_rob" <[EMAIL PROTECTED]> 
wrote:
> Hi,
> 
> I'm using the code beneath to search a form.
> 
> 
> Private Sub ZoekenCV_Click()
> On Error GoTo Err_ZoekenCV_Click
> 
>     Dim stDocName As String
>     Dim stLinkCriteria As String
> 
>     stDocName = "gegevens kandidaat"
>     
>     stLinkCriteria = "[Naam:]=" & "'" & Me![ZoekenCV] & "'"
>     DoCmd.OpenForm stDocName, , , stLinkCriteria
> 
> Exit_ZoekenCV_Click:
>     Exit Sub
> 
> Err_ZoekenCV_Click:
>     MsgBox Err.Description
>     Resume Exit_ZoekenCV_Click
>     
> End Sub
> 
> 
> In this search option there is only 1 criterium called "Naam".
> In my second search i want to use 2 cirteria.
> 
> Can anyone help me
> 
> thx,
>  Rob




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to