none
Text boxes auto-populating with dates - can't find the code that enables this RRS feed

  • Question

  • I'm working with an Access project I did not create, and trying to understand how it is that 2 of 3 textboxes designed for entering and displaying dates are being auto-populated whenever a single character is typed into any of the other textboxes on the form.

    I would have assumed that there was some assignment statement (e.g. Me.Textbox1.Text = Now() ) being executed within an event handler, or some similar mechanism.  Yet, I've searched through the entire project looking for any reference to the 2 textboxes in question, and can find nothing.  Also, I can see no difference between the 2 textboxes that auto-populate with dates and the 3rd one that doesn't (the 3rd one actually does have code setting it's text value to Now() that is executed within an event handler).

    Wednesday, July 5, 2017 1:02 PM

Answers

  • Check default values.  This could be set either in the default value property of the textboxes, or the default value of the fields in the design of the underlying table.

    Miriam Bizup Access MVP

    • Marked as answer by Tim Peters Wednesday, July 5, 2017 1:47 PM
    Wednesday, July 5, 2017 1:25 PM

All replies

  • Hi, Are you able to share the database?
    Wednesday, July 5, 2017 1:22 PM
  • Check default values.  This could be set either in the default value property of the textboxes, or the default value of the fields in the design of the underlying table.

    Miriam Bizup Access MVP

    • Marked as answer by Tim Peters Wednesday, July 5, 2017 1:47 PM
    Wednesday, July 5, 2017 1:25 PM
  • I could probably share it, but no need, now that Miriam has pinpointed the source.  Thanks anyway.
    Wednesday, July 5, 2017 1:46 PM
  • You were correct.  The default value for those columns specified "=Now()".  Thanks for that insight.
    Wednesday, July 5, 2017 1:47 PM
  • I could probably share it, but no need, now that Miriam has pinpointed the source.  Thanks anyway.

    Hi Tim,

    Glad to hear you got it sorted out. Good luck with your project.

    Good work, Miriam. Although, I would have thought a default value would show up right away on a new record even before the user dirties the form.

    Cheers!

    Wednesday, July 5, 2017 2:38 PM
  • I generally would have thought so too. I *think* I have seen cases where the defaults populate as the record is being entered, though, but cant recall the setup... possibly non-Access BE's. 

    Miriam Bizup Access MVP

    Thursday, July 6, 2017 9:09 AM