Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    daily shedule on a form (Access 2000)

    I need to build a form used to enter the visits for each day
    I have built a table consisting of the following rows

    CallId
    Client
    CallDate
    CallTime
    Subject

    I imagine the form to look like this:
    ===================
    Monday 01.01.2005

    Time Client Subject

    9.000 ABC giving an offer
    10.00 ABD good will
    ==================================
    etc etc



    I have difficulties in building the form, since i want the form to display each separate day.
    But i cannot do it. This is because the date is not an Autonumber,i.e. it is not unique
    and i cannot open it for a new day, or find a previous day.I think i have something
    basicaly wrong with my conception .For example, how shall i open the form for a new day, and how can
    i find a previous day?
    I thought i might have a subform and with a combo box to choose the day i want.Also,i had to
    ensure going to a new date,but how?
    In the attached small database in the effort to build this form, i have also a subform, and a combo box, but this combo box doesnt work.
    Which is the best approach to have a time schedule like mine? I will be grateful for any help

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    I modify your sample a little and use the Afterupdate of the combo box to filter the subform.
    In this sample you can't enter new record because the table contact is missing.
    Did this help you ?
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    Thank you very much indeed for your answer and attached sample.
    You write that i cant enter a new record because the table contacts is missing. I need however a new record, and this new record should be the present day. Can i make a new record in the form, if i modify my table and remove the field contactid?
    I will not need then the table contacts.I attach my sample with this row removed.What i want is to
    open the form with a new record which should be the present day.I could then enter the details for
    this day, move to previous days,find a day with the help of the combo box and my aim will be
    settled.

    I somehow couldnt select a date with the help of the combo box, because of a
    Run time error 3075 : Syntax error in query expression "[calldate]= # 14.10.2003#
    Is this connected with my regional settings ?

    Best regards

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    >>Can i make a new record in the form, if i modify my table and remove the field contactid?
    Yes

    >>What i want is to open the form with a new record which should be the present day.
    In the on open event remove the existing code and replace it by :
    Private Sub Form_Open(Cancel As Integer)
    Me.Combo11 = Date
    Combo11_AfterUpdate
    End Sub

    >>Run time error 3075 : Syntax error in query expression "[calldate]= # 14.10.2003#
    In the AfterUpdate event of the combox replace the line
    Me.Call_Listing_Subform.Form.Filter = "[CallDate] = #" & Me.Combo11 & "#"
    by
    Me.Call_Listing_Subform.Form.Filter = "[CallDate] = #" & Format(Me.Combo11, "dd/mm/yyyy") & "#"
    Francois

  5. #5
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    I need to thank you with all my heart for your precious advices. Everything you said
    is working and i have at last what i wanted. There is minor detail i must solve,but i am not sure shall i open a new thread or it will refer to
    the same. The point is that when i open the form, it goes to the new record indeed, which is 17.10.2004, but my subform is not cleared from the previous days.Actually my subform shows all the data for all the visits.What i want is a clear subform for the present , 17 october. Is it possible?

    Best regards

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    If you don't want to see previous records add a line to the on open event of the form:
    Private Sub Form_Open(Cancel As Integer)
    Me.Combo11 = Date
    Combo11_AfterUpdate
    Me.Call_Listing_Subform.Form.DataEntry = True
    End Sub

    If you want to see the previous records for the day and go to a new record, add two lines to the on open envent of the form:
    Private Sub Form_Open(Cancel As Integer)
    Me.Combo11 = Date
    Combo11_AfterUpdate
    Me.Call_Listing_Subform.SetFocus
    DoCmd.GoToRecord , , acNewRec
    End Sub
    Francois

  7. #7
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    Thank you very much for your advices.I have already a shedule that works.May i tune up my shedule a bit ? I want when i open the form to see only the
    details from the present day. If i write
    Me.Combo11 = Date
    Combo11_AfterUpdate
    Me.Call_Listing_Subform.SetFocus
    DoCmd.GoToRecord , , acNewRec
    Me.Call_Listing_Subform.Form.Filter = ""
    Me.Call_Listing_Subform.Form.FilterOn = False
    Then i see indeed the previous records for the day,but not only for the present day, i.e. 17 october,but also from the previous days.Can i clear from the screen the previous day and see only the data for today? The same as the combo box works.For example, if i choose the date 17 october from the
    combo box, working perfectly, then i get the results only for 17 october.Can i achieve the same result in the OnOpen event ?

    Best regards

  8. #8
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: daily shedule on a form (Access 2000)

    You have to remove the two lines :
    Me.Call_Listing_Subform.Form.Filter = ""
    Me.Call_Listing_Subform.Form.FilterOn = False
    Francois

Posting Permissions

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