Results 1 to 5 of 5

Thread: Access (97)

  1. #1
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access (97)

    Hi

    I have modified MarkJ's popup calendar to show two calendars, which I use to show the difference in days, weeks, months between the two dates selected. The popup calendars are subforms in a main form. The problem is that I wish to add a further option of go to the date in the 2nd calendar based on an interval (eg day, week, month) and date in 1st calendar.

    With my limited programming knowledge, I am having difficulty in calling a procedure in the 2nd calendar subform from the main form using a button.

    Can anyone help?

    Thanks
    WTH

  2. #2
    Star Lounger
    Join Date
    Mar 2002
    Location
    Decatur, AL
    Posts
    53
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Access (97)

    I'm not familiar with MarkJ's calendar, so please don't shoot me if it doesn't match my familiarity of the ActiveX control provided by Microsoft.

    Assuming you have the code to calculate the date in the second calendar, I would set the Value property of the second calendar to that result. Something like:

    me.calendar2.value=me.calendar1.value + (3 days or 4 weeks, etc)

    Depending on whether there is a default for calendar1, you would need to put this in OnUpdated property.

    Good luck,
    Kathi

  3. #3
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access (97)

    Hi

    Thanks for the reply, but it does not answer my question.

    A point to note is the advantage of the calendar is that it does not use ActiveX control.

    Perhaps, it may help if I attach the DB for you to look at. To run, open the form frmDates Differences. The problem occurs when calling a function in the subform - zsfrmCalendar1 from the button called Go End in the main form.

    Regards
    WTH
    Attached Files Attached Files

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access (97)

    I don't understand what you mean by going to the date in the 2nd calendar. You code for the "Go End" button doesn't work because you haven't properly referenced the subform whose routines you're calling, if that's what you mean. Try using this in the GoEnd_Click event:

    Me!zsfrmCalendar1.Form.GoEndsubform
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access (97)

    Hi

    Yes your answer was the one I was looking for (obviously in the future I need to explain my self better). I knew it would be a simple answer, but couldn't figure out the syntax. Something to remember as part of my learning curve on Access and VB.

    Regards
    WTH

    PS Thanks for taking the trouble to look at it.

Posting Permissions

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