Results 1 to 4 of 4
  1. #1
    Laetilae is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    4

    (School project) Some code that doesn't work for some weird reasons

    Hi everyone,
    I need help for a computing project.
    I do not know if I am in the right topic so forgive me if that is not the case. I am used to Visual Basic programming but ni am really not used to MS Access code.



    Please have a look at the attachment!


    Basically the problems are in the login and Clients forms. Please Have a look at the code and tell me what is wrong.

    -Login form: the program seems to not be able to enabled the objects i want in the client form when I login. (The objects are in a subform, maybe I am not using the right calling procedure?). You need to have a look at the login command button code.

    -Clients form: I asked my teacher but he doesn't know how to make the calendar works. Basiccally i want the calendar to display the event (if any) on when the user clicks on any dates on the ActiveX object. The calendar is in a subform on a page in the Client Form.

    If anyone one of you have any suggestions on how to make the program better, please do so.

    Thank you in advance for your help!
    Last edited by Laetilae; 02-06-2011 at 06:51 AM.

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Couple things I have noticed...

    1) You need to "Dim" your database the same way you have done so for your recordsets. There is a DAO.Database just like a DAO.Recordset.

    2) To get the calendar to appear you just need to set your datatype to a date. I noticed in one of your fields you had defined it as a Short Date but also had an input mask. When I removed the input mask for some reason the calendar would appear.

    3) General good practice is to name your bound text boxes a different name than the field they are bound to. Also I strongly suggest you exclude spaces from all object and field names. They will cause you some serious problems down the road.

    Let me know if this solves all your questions or if you have some more questions.

  3. #3
    Laetilae is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    4
    Thank you very much. It is working!

  4. #4
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Great, good luck!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-28-2010, 12:42 PM
  2. !!!!Urgent!!!! Search code doesn't work!
    By Laetilae in forum Programming
    Replies: 4
    Last Post: 12-13-2010, 10:34 PM
  3. Code does not work in 64 Bit Access 2010
    By mwolfod in forum Programming
    Replies: 26
    Last Post: 12-12-2010, 04:39 PM
  4. Query doesn't work when launched by code
    By stephenaa5 in forum Queries
    Replies: 1
    Last Post: 10-24-2009, 09:52 AM
  5. VBA Code To Work With MySQL
    By botts121 in forum Programming
    Replies: 0
    Last Post: 07-08-2009, 08:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums