By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Dialog Box for a Form

P: n/a
I have a dialog box to find a specific record in a form by Name Can
anyone tell me how to link it so that when i move out of the dialog
box, it pulls up that persons specific record. Mine keeps popping up
as the 1st record of the form and i can't seem to figure out how to
make it go to the selected specific form.

Dec 1 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Marc wrote:
I have a dialog box to find a specific record in a form by Name Can
anyone tell me how to link it so that when i move out of the dialog
box, it pulls up that persons specific record. Mine keeps popping up
as the 1st record of the form and i can't seem to figure out how to
make it go to the selected specific form.
I'm not sure how you are doing this. Are you on the NameForm and press
a button to call DialogForm, and upon close get the first record in
NameForm?

There's multiple ways of doing what you want to do. I'll assume the
NameForm is open. In your DialogForm, when Select/Find is pressed (i'll
assume it's found) you could do something like this in the Click event
for Select.

Dim rst As Recordset
set rst = Forms!NameForm.Form.Recordsetclone
'it'd be best to search on the key field instead of the name.
'if the key is numeric, remove the single quotes and change the
'field/form names as necessary.
rst.findfirst "NameField = '" & Me.NameField & "'"
If not rst.NoMatch then Forms!FormName.Form.Bookmark = rst.Bookmark
rst.close
set rst = Nothing

Dec 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.