Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatically clearing of fields (2000)

    I don't know if what l am trying to is possible.

    What l would like to be able to do is to clear all the specified fields (circled in blue) when a new name is selected on the drop down list "People on Distributiuon List".
    see screenshot.

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

    Re: Automatically clearing of fields (2000)

    You can use the After Update event of the combo box:

    Private Sub cboPeople_AfterUpdate()
    Me.txtThis = Null
    Me.txtThat = Null
    Me.txtOther = Null
    End Sub

    where cboPeople is the name of the combo box, and txtThis etc. are the names of the text boxes you want yo clear.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    I already have this coding in the after update , can you tell me where l would put the coding you mentioned:

    Private Sub Combo158_AfterUpdate()
    Dim strOwner As String
    If IsNull(Me.Combo158) Then
    Me.Current_Owner = Null
    Else
    strOwner = Split(Me.Combo158, ",")(0)
    Me.Current_Owner = DLookup("[names docs review]", _
    "[names docs review]", _
    "abbreviation =" & Chr(34) & strOwner & Chr(34))
    Me.[Date given doc] = Int(Now)
    End If
    End Sub

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

    Re: Automatically clearing of fields (2000)

    If you always want to clear the three text boxes, put the code above the If ... Then line or below the End If line.

  5. #5
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    I want to clear ther fields on the second time l use the dropdown and not the first.
    As the first time l use the drop down l want to use the names.
    What l would really like to do again don't know if possible is to clear the old values then autocomplete them as per the first time l use the drop down.

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

    Re: Automatically clearing of fields (2000)

    Please explain more clearly.

  7. #7
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    What l would like to do is when the combo box is selected for the second time to clear the "Date Given to Owner" ,"Complted Date, "Email Reminder Sent" and "Date Reminder Due" and place them with the relvant information as there maybe previous information in these fields and then replace this information with the correct information.
    i.e the "Date Given to Owener" should be todays date and the "Date Reminder Due" should be 7 working days from the date give to Owener. This is what happens the first time when l use the combo drop down. Any other information in any of the other fields should be cleared.
    Is that any clearer?

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

    Re: Automatically clearing of fields (2000)

    If it already happens the first time you use the combo box, why doesn't it happen the next time?

  9. #9
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    This l don't know , any ideas?

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

    Re: Automatically clearing of fields (2000)

    How is it done the first time?

  11. #11
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    Would you like me to send you the coding for this?

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

    Re: Automatically clearing of fields (2000)

    You can attach a text file with the code to a reply, or a stripped down and zipped copy of the database.

  13. #13
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    see attachment for coding.

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

    Re: Automatically clearing of fields (2000)

    That's the same code you had already posted earlier in this thread. The code sets Current Owner and Date Given Doc, but it doesn't set Completed Date, Email Reminder Sent or Date Reminder Due. Are those calculated controls?

  15. #15
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically clearing of fields (2000)

    I think these values are calculated some where else in the coding.
    I am not to sure what you mean by calculated controls?

Page 1 of 2 12 LastLast

Posting Permissions

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