Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Updating an unbound object in a subform (2003)

    Hi, In the following attachment. you will see that I have two TABS. on the TAB named Notes there is a subform that display the notes on file for that individual. Well when i click to create a new record button, all the fields are new but when i go to the note TAB the notes are displaying the data from the previous individual. I have a code already in the form OnCurrent event to update the picture when a new record is created. This code was provided by hans. I tried to requery the subform from the OnCurrent event and an error message pop up saying in can not find the subform name ???. Any Comments.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Updating an unbound object in a subform (2003)

    Your subform only contains an unbound list box. It will always display all records from the notes table.
    You should put text boxes bound to the fields from the notes table in the detail section instead. If you want to see multiple records, make it a continuous subform.
    See the attached version.

  3. #3
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Updating an unbound object in a subform (2003)

    I see now the records are bound to their perspective user ID when i create a new record. But one more thing, the way how i had it before in the unbound list box was in the event i click one of the items in the list the other form will open so I can see the whole memo. right now I can not read the full memo in a single view. I will like just to see the subform with the NoteNo, createdDate, subject,createdby. Then when i click on one of the items in the record the other form opens wiht the full message or if i click the add note button the other form opens and show me the full memo to type; keeping in mind all records with their individual person. Sorry for the trouble. I really appreciate all your help.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Updating an unbound object in a subform (2003)

    If you want to use the list box, you don't need a subform. Place the list box directly in the Notes tab on the main form, and use code in the On Current event of the main form to update it.

    I'd use the On Dbl Click event of the list box, by the way - using the On Click event means the user isn't allowed to make mistakes, for as soon as (s)he clicks on an item, the form is opened.

    See attached version.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Updating an unbound object in a subform (2003)

    UHH OHHH, that is perfect!! thank you hans.

Posting Permissions

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