Programmatically selecting a whole record in a datasheet subform..

G

Guest

Hi - I am using the code below to programmatically find a record in a subform
having a Datasheet configuration based on a value on the main form. It works
fine, but is there a way that I can make it select the whole record instead
just the field it found?

'***********************
Dim rs As Object
Set rs = Forms!frmMain!fsubContext.Form.Recordset.Clone
rs.FindFirst "[Zip] = '" & Forms!frmMain![Zip] & "'"
Forms!frmMain!fsubContext.Form.Bookmark = rs.Bookmark
'***********************


Thanks so much for any ideas!

Dan
 
G

Guest

I may be misunderstanding your question, but once you do the FindFirst, the
first record that meets the criteria is the current record.

To get other fields would be a matter of

Forms!frmMain![State] = rs("State") for each of the fields in rs

or rs.delete to delete the record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top