Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    VBA (Access 2002)

    I have a combo box (let
    Easy Access

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

    Re: VBA (Access 2002)

    Set the DefaultValue property of the combo box to DateSerial(Year(Date()),Month(Date()),1)

    Use this in the After Update event of the combo box:

    Private Sub cboStartDate_AfterUpdate()
    Me.strEndDate = DateSerial(Year(Me.cboStartDate), Month(Me.cboStartDate) + 1, 0)
    End Sub

    This sets the end date to the 0-th day of the month following the month of cboStartDate'; VBA automatically converts this to the last day of the month of cboStartDate.

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: VBA (Access 2002)

    Thank you very much for the help Hans. Your solution works GREAT! <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>
    Easy Access

Posting Permissions

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