Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A Date (Access2000/Access 2003)

    I have a date which contain a date like 01/20/2006. I need to remove the date from the date field. Moving zeroes does not work.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: A Date (Access2000/Access 2003)

    What do you mean by "I need to remove the date from the date field"?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: A Date (Access2000/Access 2003)

    Do you want to do this in the user interface or using VBA? (And also answer Pat's question, please)

  4. #4
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: A Date (Access2000/Access 2003)

    Pat,
    I need the field to be blank. Since I have a Field called Meals, which can be Yes, No or Another Provider. When it is Yes then I have a Start Date which is filled in. But if the Meals Field is changed to No, the Start Date needs to be removed.
    Sarge

  5. #5
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: A Date (Access2000/Access 2003)

    HansV,
    I am doing all of this in VBA. As for my problem with Testing a field for spaces in VBA, I changed all the data to null. Problem of testing for spaces solved for now.
    Sarge

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: A Date (Access2000/Access 2003)

    To clear a field in code, set it to Null:

    Private Sub Meals_AfterUpdate()
    If Me.Meals = "No" Then
    Me.[Start Date] = Null
    End If
    End Sub

  7. #7
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: A Date (Access2000/Access 2003)

    HansV,
    Real problem, I am tired. The Start date field read: Me!StartDate.Enabled = "". I could not see the tree for the forest. Sorry I bothered you and Pat.
    Sarge

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: A Date (Access2000/Access 2003)

    Don't feel like you are a bother to anyone, that's what this forum is for, to ask questions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •