Comparing user input date in a form with a date which is stored in another form (and therefore its database)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • accecssuser
    New Member
    • Sep 2022
    • 1

    Comparing user input date in a form with a date which is stored in another form (and therefore its database)

    Hey there,
    I am dealing with two forms in access. One of them has a "Date Code" field which asks the user to enter a date. I want it to be such that if the date entered by the user is greater than a "Fix Date" date which appears in another form, I would like to throw a notification saying that the DateCode must precede the Fix Date. I am trying to use the validation rule of the expression builder but it is throwing some error. I am not sure if i should be comparing the DateCode with the FixDate from the second form, or from the corresponding table of that second form. So far I am using the expression: [DATECODE]<= Forms![FindingsMainten anceF]![FixDate]
    As can be seen, the input datecode value is being compared with the fixdate value in another form named "FindingMainten anceF". I also tried to compare the same datecode value with the FixDate in the table where the values of that form are stored but that didn't work either.

    I was hoping if someone could point out the correct syntax to compare these values. Thank you so much for reading till here and for your time. Cheers.
  • isladogs
    Recognized Expert Moderator Contributor
    • Jul 2007
    • 483

    #2
    Hi
    Welcome to the forum.
    For info, posts for new users are moderated to prevent spam. That's why your two identical posts didn't appear.
    I've approved this post and deleted the duplicate thread.

    I'm sure someone will respond to your question soon

    Comment

    Working...