Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Sorry, should probably be:

    Me.List8.ItemData(0)



    I forgot to edit my post after I discovered error.

    Suggestion - give controls more meaningful names, like tbxDate, lbxDates, tbxEnv, lbxEnvs.
    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.

  2. #17
    lenlab is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    24
    Now that I look at this I suspect (even though I no nothing of VB code) the error is legit .....as the date (Text10) is blank when the form is opened. So the fix would be to have a date in Text10 when the form is opened?

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    The error was because code references the wrong listbox. Did you fix the code to reference the correct listbox?

    Also, this won't work for existing records, only new records. You will have to manually enter/select a value for existing records.
    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.

  4. #19
    lenlab is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    24
    OK...made the latest changes you sent and it appears to work great! I did some quick testing. I will do more testing Wed. So far I am happy!

  5. #20
    lenlab is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    24
    Further testing has uncovered an issue. When updating the form Sunday Collection, a bogus entry is added to the New Giving Table with an $ amount, env# and a 1/6 date. Still investigating what is going on. I hope to be able to provide more info with more testing.

  6. #21
    lenlab is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    24
    When I make my first entry in the Sunday Collection form, it seems to take a record with a newer date in the New Giving table for the first envelope# in that table and moving it to a 1/6 date with the money from that record. As an example when I entered a record for Sunday 8/11 for env#24, that record was added but it also took the record for env#2 (which is the first one) for the week of 2/10 and moved it to 1/6. So my weekly totals for the Sunday of 1/6 are up $18 and the totals for 2/10 are low by $18. Perhaps I did not put the VB code in correctly? See how it looks below:

    Private Sub Form_Load()
    Me.Text10 = Me.List8.ItemData(0)
    Me.Text10.DefaultValue = "#" & Me.Text10 & "#"
    End Sub

    Private Sub Form_AfterUpdate()
    Me.Text10.DefaultValue = "#" & Me.Text10 & "#"
    End Sub

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Okay, turns out line not needed in the Load event:

    Me.Text10 = Me.List8.ItemData(0)

    Change the line that follows it to:

    Me.Text10.DefaultValue = "#" & Me.List8.ItemData(0) & "#"
    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.

  8. #23
    lenlab is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    24
    A BIG THANK YOU! You are a SUPER, SUPER Moderator! I applied the change and tested it and that worked perfectly. I would like to do a little more testing but the problems I saw previously are fixed! I just want to make sure I am not missing something when I do the massive Sunday money data input. I will know Sunday.

    I can't thank you enough for this fix and the critique of the database.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Date criteria using between and form date picker
    By killermonkey in forum Queries
    Replies: 3
    Last Post: 03-21-2013, 12:44 PM
  2. Replies: 6
    Last Post: 12-27-2012, 10:49 AM
  3. Replies: 3
    Last Post: 08-21-2012, 03:05 PM
  4. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  5. set date field on form to date variable
    By laavista in forum Access
    Replies: 3
    Last Post: 06-28-2010, 03:03 AM

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