Results 1 to 8 of 8
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Update Main Form From Subform

    Main form is frmEvent and subform is frmMissedEventssub



    I tried using Me.Parent!dteentered = Date but that did not work?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Why didn't it work - error message, wrong results, nothing happens? How is that updating main form from subform? Do you mean the code is behind subform - in what event? Why would subform update data in main form?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    The data in the subform is generated via a module for missed dates for records in the table for the main form.This data comes from a different table and has to be appended to the table that the main form uses. The main form is being updated via code in the OnClickEvent of a checkbox. The subform has to update the main form because there were times when that record on the main form was not entered and the subform has the list of dates when this was. So even though the main form can have only ONE record, i.e. primary key for each instance, there were times when that record did not get entered. And so more missed dates, more missed check numbers... If the ONLY thing I had to worry about was just the Daily occurrences of that record, then I would only have to filter out whether it was a recurring event or a one time, non-recurring event and enter accordingly, but that is not the case. Anyway, this has nothing to do with the price of cotton in China! Just wrong syntax to get the main form fields updated is all. I tried also Forms!frmEvent.Form![dteentered] = Date and that did not work either.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Child records created before data entry to parent record was completed?

    Forms!frmEvent!dteentered = Date

    I just tried Me.Parent for the first time and it errors. Don't know how to use it.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Child records were created AFTER record was entered. Record does not get completed until an expiration date is given. I tried that, it did not work, however that field does have a default setting using another field, would this affect the code? MYDte uses EventStart as a default setting and EventStart is a date field.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    What do you mean by 'default setting' - Default property? Default property applies only when record first created, means nothing after that.

    What is MYDate?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    MyDte is the date used for the final destination which is the check register and it is also used as the date when the transaction is entered. EventStart is the original date.
    MyDte has under properties\Data\Default Value =[EventStart]

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I have no idea how MyDte pertains to this issue. It was not even mentioned in your original post.

    I don't know why the textbox on main form is not populated by subform event. Works for me.

    Have you step debugged?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 01-29-2013, 08:59 AM
  2. Requery subform after update of main form
    By gemadan96 in forum Forms
    Replies: 3
    Last Post: 10-17-2012, 02:33 PM
  3. Replies: 1
    Last Post: 07-20-2012, 09:48 AM
  4. Replies: 3
    Last Post: 04-17-2012, 10:28 AM
  5. Replies: 3
    Last Post: 03-11-2012, 08:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums