Find Record - In another Form

T

Trini Gal

Hello,

First of all, let me say that I have looked all over here for help with this
and wasn't very successful.

I have a form with a subform in it. I want when the user wants the edit
exisiting data, they click on the Edit button, and a dialog form pops up
asking the user to enter their name and the current date. This works fine.
After the user enters their information, and clicks the Okay button, to
return to the previous form is where the problem is. They keep getting taken
to the first record, not the specific record that they are editing.

Can someone please point me in the right direction how to accomplish this?

Thanks.
 
A

Allen

Trini,

I use the Bookmark property. For example,

With Forms(FrmName)
.RecordsetClone.FindFirst "FormID=" & FormID
.Bookmark = RecordsetClone.Bookmark
End With

where the first FormID is primary key field name, and the second FormI
is the value of that field that you want to find.

For an example of this in action, download the demo a
http://www.aislebyaisle.com/access/tools2.ht
 
T

Trini Gal

Allen,

Thanks for your reply. I will try it now. I have just one question though.
In the first line

With Forms(FrmName)

the FrmName...which form is that, the first from, or the pop up dialog form?

I thank you again for your response.
 
Top