+ Reply to Thread
Results 1 to 3 of 3

In need of help regarding combo box coding and button coding (Access form project)

  1. #1
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Question In need of help regarding combo box coding and button coding (Access form project)

    Hi there

    It has been some time since I have used Access.. I am very rusty, especially with regards to my coding. I started a very basic daily form project which has 4 different fields. The 4 text fields I added all use short time as a format. I would appreciate some help regarding the button coding immensely. Each work day (Hours worked) is 8 hours.It can be >8<. If the employee clocks out later, the extra time must be added to the overtime field.

    1st Shift time in: 08:00
    1st Shift time out: 12:30

    2nd Shift time in: 14:00
    2nd Shift time out: 17:30 CALCULATE (button)


    Hours worked: _________ (textbox)
    Overtime: _________ (textbox)


    I have been busy with the combo boxes in this particular project. Is there a way to populate a 2nd combo box with only relevant information?

    E.g I have a department combo box. When I select "IT", I want the employee combo box to only display all the "IT" personnel. I have the two required fields in a relationship. I do not know the correct coding, I have tried many different sources/code.



    Any and all help would be greatly appreciated!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,189

    Re: In need of help regarding combo box coding and button coding (Access form project)

    no code needed, just queries.
    Your cboDept gets IT selected, then triggers AFTERUPATE event. This updates the cboEmps based on cboDept
    The query in cboEmp, looks at the cboDept as a filter, so the query "qsEmpsByDept" looks like:
    select [emp] from tEmployees where [dept]= forms!frmEntry!cboDept

    Then must be refreshed when the cboDept changes...
    Please Login or Register  to view this content.
    As for time entry, user enters the times into a table.
    you run a query that sums the time (up to 40), qsRegTimeSum
    and another query that sums > 40, qsOvertimeSum

  3. #3
    Registered User
    Join Date
    12-29-2015
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010
    Posts
    7

    Re: In need of help regarding combo box coding and button coding (Access form project)

    Thank you for your reply.

    My issue has been solved using the afterupdate queries.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with coding an edit row button form a userform
    By Stephen_Malley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-10-2014, 07:53 AM
  2. Creating coding for grading for class project
    By Burkex12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2013, 04:53 AM
  3. Please share any small excel project for better understand with VBA coding
    By veerakumar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2013, 10:43 AM
  4. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-02-2013, 11:16 PM
  5. Coding script error-cmd button to open form and for to add new entry to list
    By Southfish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2012, 05:43 AM
  6. Combo Box to find records on Form - coding problem
    By annieb in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2010, 11:47 AM
  7. Userform coding to mimic Form Button
    By copernicus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2009, 03:30 AM

Tags for this 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1