Ok, I don't understand: You must place a CommonDialog control on your form (XCommonDialog) and then
Where do I do the above? appologies.... --- In [email protected], "Orville" <[EMAIL PROTECTED]> wrote: > > Is the name of the object. The code refers to it but you can change the > name. > > > > > -----Messaggio originale-----t > Da: [email protected] > [mailto:[EMAIL PROTECTED] Per conto di lostfayth > Inviato: lunedì 9 gennaio 2006 20.32 > A: [email protected] > Oggetto: Re: R: [AccessDevelopers] Add a file (hyperlink) from a form > > (XCommonDialog)?? > > > > --- In [email protected], "Orville" <[EMAIL PROTECTED]> > wrote: > > > > You must place a CommonDialog control on your form (XCommonDialog) > and then > > you can use the following code on click event of a button called > PosImg. > > > > > > > > > > > > Private Sub PosImg_Click() > > > > On Error GoTo Err_Browse > > > > Dim strFilename As String > > > > Dim oDialog As Object > > > > Set oDialog = Me.XCommonDialog.Object > > > > > > > > oDialog.CancelError = True > > > > > > > > strDialogo = "description of window" > > > > With oDialog ' Ask for new file location. > > > > .DialogTitle = strDialogo > > > > .Filter = "File Excel (*.xls)|*.xls" `file you're > searching for > > > > .FilterIndex = 1 > > > > .ShowOpen > > > > ' If user responded, put selection into text box on form. > > > > If Len(.FileName) > 0 Then `here you can store > in a field > > the file name and path name > > > > Me.El_XLname = Dir(.FileName) > > > > Me.El_XLpath = .FileName > > > > End If > > > > > > > > End With > > > > > > > > > > > > Exit_Browse: > > > > Exit Sub > > > > Err_Browse: > > > > If Err.Number = cdlCancel Then Exit Sub > > > > MsgBox Err.Description > > > > Resume Exit_Browse > > > > End Sub > > > > > > > > -----Messaggio originale----- > > Da: [email protected] > > [mailto:[EMAIL PROTECTED] Per conto di lostfayth > > Inviato: lunedì 9 gennaio 2006 19.09 > > A: [email protected] > > Oggetto: [AccessDevelopers] Add a file (hyperlink) from a form > > > > > > > > Ok. I have a Project Tracking Database. I have a subform called > Files > > > > with a text box called FileLocation. > > > > > > > > I want to create a button or an onclick (doesn't matter) so that > it > > > > automatically opens a window so the user can search for the file > on > > > > thier hard drive. > > > > > > > > Then when the user selects the file it automatically insert the > file > > > > location into the text box. > > > > > > > > Any suggestions? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Please zip all files prior to uploading to Files section. > > > > Yahoo! Groups Links > > > > > > > > http://groups.yahoo.com/group/AccessDevelopers/ > > > > > > > > [EMAIL PROTECTED] > > > > > > > > http://docs.yahoo.com/info/terms/ > > > > > > > > > > Please zip all files prior to uploading to Files section. > Yahoo! Groups Links > Please zip all files prior to uploading to Files section. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessDevelopers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
