Find record command

M

Marc

Hello,

Can I use DoCmd.FindRecord to find the contents of the clipboard? Maybe I'm
not doing this the best way, but I want to close one form, and open another
to the same order number (a field in both forms) that the first form was on.
I thought I could copy the order number field in the first form, the used
FindRecord and have it find what I copied. Is this a crazy way to do things,
or will it work?

Thanks,
 
S

Sandra Daigle

Hi Mark,

There is a much easier way using the WhereCondition parameter of
docmd.openform. For example, the following will open the form "CustDetails"
and filter it
according to the "Custid" on the current record in the calling form.

docmd.OpenForm "CustDetails",,,"Custid=" & me.custid
 
M

Marc

Hi Sandra,

That was MUCH easier, and worked exactly how I wanted it to!

Thanks a bunch,

Marc

Sandra Daigle said:
Hi Mark,

There is a much easier way using the WhereCondition parameter of
docmd.openform. For example, the following will open the form "CustDetails"
and filter it
according to the "Custid" on the current record in the calling form.

docmd.OpenForm "CustDetails",,,"Custid=" & me.custid

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Hello,

Can I use DoCmd.FindRecord to find the contents of the clipboard?
Maybe I'm not doing this the best way, but I want to close one form,
and open another to the same order number (a field in both forms)
that the first form was on. I thought I could copy the order number
field in the first form, the used FindRecord and have it find what I
copied. Is this a crazy way to do things, or will it work?

Thanks,
 
M

Marc

Well I tried it on the format properties. I couldn't get it to work. It
displayed what I typed next to the value in the field. Do you have any other
ideas? Thank you for your help.
 
Top