Results 1 to 5 of 5
  1. #1
    LarryE is offline Novice
    Windows 8 Office 365
    Join Date
    Apr 2020
    Location
    Elyria, Ohio
    Posts
    2

    Back Fill Access Field, Date->MoonPhase... Help!

    Help!


    I am writing a snippet of VBA code for an MS Access database and I need to know how to 'back fill' data to a field. My field is called 'MoonPhase' and is filled AFTER a date has been entered into the Date field. Suppose, There are two fields in the database, First is named 'Date' and is comprised of a Date field. Once the Date is entered and <Enter> is pressed, the background process does the math on the date, finds the phase of the moon (per Date) and back fills the moonphase into the field. Can someone help me please. Thanks in advance. -Larry

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'd probably use the after update event of the date textbox. I'd have a function that accepted a date, did the math, and returned the phase. I have no idea what the math is.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    LarryE is offline Novice
    Windows 8 Office 365
    Join Date
    Apr 2020
    Location
    Elyria, Ohio
    Posts
    2
    Quote Originally Posted by pbaldy View Post
    I'd probably use the after update event of the date textbox. I'd have a function that accepted a date, did the math, and returned the phase. I have no idea what the math is.
    Problem I need solved is... how do I take the data from my function MoonPhase() and place it into MoonDate (Field)?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Me.MoonDate = FunctionName(Me.DateFieldName)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 08-21-2015, 08:14 AM
  2. Replies: 8
    Last Post: 10-24-2014, 01:11 PM
  3. Auto Fill a date in a field
    By SJJ in forum Access
    Replies: 1
    Last Post: 02-17-2014, 02:39 PM
  4. Replies: 3
    Last Post: 12-24-2013, 04:20 PM
  5. Lock field after auto date fill
    By DCV0204 in forum Forms
    Replies: 4
    Last Post: 11-25-2013, 08:53 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