Customise Where Condition

satoshi79

New member
Local time
Tomorrow, 07:15
Joined
May 25, 2003
Messages
5
Hi there,

Please refer to this line of code below:

DoCmd.OpenForm "frmBuyersInterestedPropertiesDirectory", acNormal, , "[BuyerID]='" + Me![BuyerID] + "'"

I have tried to customise this (where) statement to display "frmBuyersInterestedPropertiesDirectory" from
frmBuyerPropListing when the BuyerID and PropertyID are the same for both forms.

How do I include PropertyID into the statement above?

Any suggestions?

Thank you.
satoshi
 
Satoshi,

Give this a try and let me know how you get on. I use this a lot on my DB.

DoCmd.OpenForm "frmBuyersInterestedPropertiesDirectory" 'Open the form
Forms!frmBuyersInterestedPropertiesDirectory!PropertyID.SetFocus 'Sets focus on the PropertyID field'
DoCmd.FindRecord Forms!frmBuyerPropListing!BuyerID 'Go to the record with the corresponding ID from the current form

HTH
Andrew
 
Many thanks for the tip Pat, I wasn't even aware there was another method. And sorry for leading you astray Satoshi!
 

Users who are viewing this thread

Back
Top Bottom