Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    14

    Unanswered: Kindly help me as soon as possible....

    Hi,
    I am new to access,I have design an employee form & some tables.Kindly let me know how can i add records from form in to tables,I am not able to write anything in the text box.In emloyee form I have taken fields from multiple tables.I'm also trying to insert a picture into a form in the exact same way that the Northwind sample database does in the Employees form.I'm getting an error that

    runtime error 2135
    this property is read only and can not be set

    This error points to the following subroutine and
    highlights Me![ImagePath].Text = fileName

    Sub getFileName()
    ' Displays the Office File Open dialog to choose a file
    name
    ' for the current employee record. If the user selects a
    file
    ' display it in the image control.
    Dim fileName As String
    Dim result As Integer
    With Application.FileDialog(msoFileDialogFilePicker)
    .Title = "Select Picture"
    .Filters.Add "All Files", "*.*"
    .Filters.Add "Bitmaps", "*.bmp"
    .Filters.Add "JPEGs", "*.jpg"
    .FilterIndex = 3
    .AllowMultiSelect = False
    .InitialFileName = CurrentProject.path
    result = .Show
    If (result 0) Then
    fileName = Trim(.SelectedItems.Item(1))
    Me![ImagePath].Visible = True
    Me![ImagePath].SetFocus
    Me![ImagePath].Text = fileName
    Me![Name].SetFocus
    Me![ImagePath].Visible = False
    End If
    End With
    End Sub

    I'm hoping that someone help me .Thanx in advance

  2. #2
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: Kindly help me as soon as possible....

    Originally posted by fatim
    This error points to the following subroutine and highlights
    Me![ImagePath].Text = fileName
    Is ImagePath a textbox or a picturebox?
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  3. #3
    Join Date
    Aug 2003
    Posts
    14
    Imagepath is a textbox.

  4. #4
    Join Date
    Aug 2003
    Posts
    14

    Re: Kindly help me as soon as possible....

    Originally posted by DoktorBlue
    Is ImagePath a textbox or a picturebox?

    Imagepath is a textbox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •