Results 1 to 6 of 6
  1. #1
    venu_resoju is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    19

    Display value in a text box after scheduled date

    Hello Friends......."HAPPY NEW YEAR ALL OF YOU"



    I am in learning stage and I am trying to set a task, but can't. I have a form named "PAY", which has a text box named "WageRate" and combobox named "EmpName"

    and having tables are as below

    TblEmployees
    ID EmpName Wage
    1 Venu Rs:150.00
    2 Ravi Rs:200.00
    3 Kiran Rs:180.00
    4 Balu Rs:195.00


    TblIncrement
    ID EmpName Increment
    1 Venu Rs:50.00
    2 Ravi Rs:30.00
    3 Kiran Rs:70.00
    4 Balu Rs:35.00


    qryWageIncrement
    ID EmpName Wage Increment DateFrom
    1 Venu Rs:150.00 Rs:50.00 12-Jan-2013
    2 Ravi Rs:200.00 Rs:30.00 01-Dec-2012
    3 Kiran Rs:180.00 Rs:70.00 04-Jan-2013
    4 Balu Rs:195.00 Rs:35.00 15-May-2012

    Rowsource: (of combobox is)
    SELECT WageIncrement.EmpName, WageIncrement.Wage, WageIncrement.Increment, WageIncrement.DateFrom FROM WageIncrement;

    I am trying to set to display in textbox named "WageRate" is [Wage]+[Increment] after scheduled/DateFrom date and don't want to display in before date when I select the combobox.
    please help me all that how to write a code for the above.

    Thanking you all

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not sure I understand what you are asking for.

    If you want the combobox RowSource restricted to records where DateFrom values are before the current date then try:

    SELECT * FROM qryWageIncrement WHERE DateFrom < Date;

    If you don't want the textbox to calculate unless a particular condition is met, please explain more what that condition is.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    venu_resoju is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    19
    Thank you friend,

    Actually I have a Payroll form that having a combobox named "CboEmpName" and a text box named "WageperDay".

    when I select in "CboEmpName", the text box will get by "Me.Wageperday = Me.CboEmpName.Column (1)"

    I want to add Increment amount to "WageperDay" text box from the date on words that which entered in "[Increment]![DateFrom]"

    I am attached a DB, please help me....
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I still don't understand what the date has to do with displaying Wage or Increment. The Increment table has only one record for each employee. Will there ever be more than one record for each employee?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    venu_resoju is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    19
    Sorry...I am unable to express my thoughts.

    I have created a Payroll Database, in which I added a "Increment" Table like in a attached MDB.

    What am I thinking is....
    I want to give a salary Increment of Rs:50.00 to a Employee (Exp: Venu) from 01-Jan-2013. Which is updated today in Increment table like below.
    Increment
    ID EmpName Increment DatrFrom
    1 Venu Rs:50.00 01-Feb-2013
    when I calculate the salary of venu employee for the period from 01-Jan-2013 to 31-Jan-2013, the text box named "Wageperday" on "Payroll" form should get/show Rs:250.00 only and 01-Feb-2013 onwords it will get/show Rs:300.00 (Rs:250.00 (Previous wage) + Rs:50.00 (Increment)).

    I mean calculate the salary of venu employee for the period from 01-Feb-2013 to 28-Feb-2013, the text box named "Wageperday" on "Payroll" form should get Rs:300.00

    How can I get this.

    Thanking you friend..........

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Where will the criteria for choosing the Increment come from? If there were more than one record for each employee in Increment table, how do I know which one should be used? I do I know which payperiod need to find the appropriate increment for.

    You do not have a table for storing the payperiod data. Is this as far as you have developed the db? This is not a functional db yet. No way to do what you want with this structure.

    Payroll database is very difficult to build. I recommend you use off-the-shelf application like Quickbooks.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 6
    Last Post: 12-27-2012, 10:49 AM
  2. Replies: 4
    Last Post: 08-25-2012, 10:30 PM
  3. Scheduled run of Compact-Repair off hours
    By techexpressinc in forum Access
    Replies: 1
    Last Post: 05-25-2011, 11:08 AM
  4. Currency/text display issues
    By Akazuba in forum Access
    Replies: 3
    Last Post: 04-20-2011, 07:51 AM
  5. Display field as text box
    By thekruser in forum Forms
    Replies: 5
    Last Post: 08-31-2010, 10:37 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