-----Original Message-----
Dear MJ,
Answer A:
From the subform can you set focus on a control on the
main form by using following case:
Forms![TheMainFormName]![TheControlName].SetFocus
Answer B:
If you are using Access XP can you open file dialog
window to select any file on the network and get its name
and path to a textbox (named txtDestination in my Case
below). If you are not using XP version gave Helen
Feddema some advice on her site
www.helenfeddema.com some
time ago.
Private Sub cmdGetFile_Click()
'Set Refrence to: Microsoft Office 10.0 Object Library
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogOpen)
fd.AllowMultiSelect = False
fd.Title = "My dialog window"
fd.ButtonName = "My button"
'Næstu línur eru til að hreynsa og endurbyggja
valmöguleika
fd.Filters.Clear
fd.Filters.Add "Access files", "*.mdb", 1
fd.Filters.Add "Excel files", "*.xls", 2
fd.Filters.Add "Other stuff", "*.*", 3
fd.FilterIndex = 2 'Default Excel
If fd.Show = True Then 'Show the window
Me.txtDestination fd.SelectedItems(1)
Else
'User selected Cancel
End If
End Sub
One advice, do not ask 2 questions in the same Post.
Enjoy!
Arni Laugdal, MMI
-----Original Message-----
How does one setfocus on a control on the main form while
one is on a control on a subform?
Also, I want to a link a document (residing on the
network) to a record in a database. I can do that (called
the field 'hyperlink' in the table) but it always defaults
to the directory in which the database resides.
Thanks
.
.