Open a form based on meeting two criteria ID

shery1995

Member
Local time
Today, 13:06
Joined
May 29, 2010
Messages
71
Hi All

I am trying to open a form with following code:

DoCmd.OpenForm "frmClientMatter" ,,,"[ClientID]=" & Me. ClientID &"'"& and "[MatterID]=" & Me.MatterID

But code does not work.

Any help suggestion will be much appreciated.

A Munir

Please note both (ClientID and MatterID) are numeric fields.
 
If they are both numeric, there's no need for a single quote. Even if they aren't, quotes need to work in pairs.
 
Hi. Try it this way:
Code:
DoCmd.OpenForm "frmClientMatter", , ,"[ClientID]=" & Me. ClientID &" and [MatterID]=" & Me.MatterID
Edit: Oops, too slow...
 

Users who are viewing this thread

Back
Top Bottom