+ Reply to Thread
Results 1 to 7 of 7

Thread: Custom Calendar Control

  1. #1
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Custom Calendar Control

    I picked this up sometime ago. Personally, I don't like the active x calendar control, and I?ll try to avoid most active x's where possible.

    This is very straightforward to implement, and it will certainly improve data accuracy.

    If you want to use it, just copy the module and calendar form into you db. You can add it to all your forms with ease. Just call the calendar from a text box, i've used the dblclick event. But on GotFocus is benificial.
    Attached Files

  2. #2
    Barn Enthusiast sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69 is a jewel in the rough sbenj69's Avatar
    Join Date
    Mar 2008
    Location
    The frigid northern plains
    Posts
    432
    Rep Power
    7

    nice.

  3. #3
    Barn Newbie zip929 is an unknown quantity at this point zip929's Avatar
    Join Date
    Sep 2008
    Posts
    1
    Rep Power
    4

    Neat, and very useful. Well done.

  4. #4
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Glad it helped,. unfortunately its not my design,. but props to who ever made it,.
    If i helped you, make me famous by clicking the

  5. #5
    Barn Newbie Psychadelic is an unknown quantity at this point Psychadelic's Avatar
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    4

    How to implement this into a ComboBox?

    Hi there,

    i like this Calendar form, but how can i make this work in a ComboBox?
    it worked fine in a Textbox control, but i'd like to implement it into a ComboBox.

    Please help,

    Also a next step would be to make this work with:

    - a ComboBox on Mainform that is connected to a Subform
    (my form works fine: when i choose a date in Dropdownlist of my ComboBox the records in the subform that corresponds to the date in mainform will be shown)

  6. #6
    Lightning Master AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123 is a jewel in the rough AOG123's Avatar
    Join Date
    Mar 2008
    Location
    Fortress Of Solitude
    Posts
    394
    Rep Power
    7

    Hi, I had a think about this and there is no need for a combo,.

    What you want to do is: -

    1: Ensure your subform is based on a query

    2: In this query use this type of filter,
    Code:
    Like "*" & [Forms]![MainFormName]![DateTextBox] & "*"
    
    ' "*" will show all records when blank'

    3: In the main form create a command button to Filter the sub,
    Code:
    Me.Refresh
    
    And thats pretty much it

    Please see new attachment for reference.
    Attached Files
    If i helped you, make me famous by clicking the

  7. #7
    Barn Newbie Psychadelic is an unknown quantity at this point Psychadelic's Avatar
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    4

    Thanks for the reply,

    i have added your code "Me.Refresh" in my mainform behind a commandbutton On click event, and it works to "filter" subform with selected date.

    but the whole form/subform doesnt really work as intended, its not finished yet. i run into severl minor probs.


    Form: mainfrmExperiment1
    -------------------------

    I have a Mainform with a combobox named "cboDate" that has a Select query in it "to select only the entered Dates available at that moment in the Database table "Work_Table" using DISTINCT (so no duplicate dates).

    When u Double-click on the combobox cboDate a Calendar will popup, letting the user to choose a date in calendar and put it in the cboDate combobox.
    this works but i m getting other issues that i have to find a solution for it:

    Request 1:

    After selecting Date in Calendar, if you pust "Show" button, access should

    check if its a new date or an already existing date. If it is a new date with no records in Work_Table, user should be prompt with msgbox "no records found, would you like to enter records for this date?" something like that.

    Then

    - user can add a new record for chosen date (the date you entered in cboDate combobox will be your primary key)
    - only Date should be displayed, and all other fields in the record are empty,

    the user has to select employeename, shift, and then add the periods.

    (im aware of the fact that i need to make a second table "Work_Details", so i can make a 1-N relation between (Date, Employeenr, Shift) <-----> (Periods, start_time, end_time, activity_code, area_nr)


    Request 2:

    There should be a counter in column "Period", when you Add new record
    (maybe this can be solved by coding but i dont know howto)

    i have more questions regarding the same form, on how to do it in access and havent found an answer yet. so maybe i will post these later on.

    For now, please check attached Database, and im looking forward to your ideas/suggestions on how to improve this form.
    Attached Files

+ Reply to Thread

Bookmarks

Posting Permissions

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

SEO by vBSEO