runtime error 424

N

Netalie

Hi,

I need to store a file's location in a text box, in an
open form.

i have added the common dialog command, and another
button, which "on click" run's the following code:

Private Sub Command10_Click()
CommonDialog.DialogTitle = "Select a file..."
CommonDialog.Filter = "*.JPG"
CommonDialog.ShowOpen
Me.field.Text = Dialog.FileName
End Sub


i need the "field" to recieve and store the path of the
selected file.

the line: "Me.field.Text = Dialog.FileName" gives me a
runtime error 424, object missing.

How can i solve this problem?
 
Top