Results 1 to 2 of 2
  1. #1
    slkamath is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    1

    Regarding the Date


    Dear All,

    I have 3 tables called Input, Daily Production, Preventive Maintenance.

    In INPUT TABLE FIELDS ARE MENTIONED BELOW:
    IP_PRTNUMBER - PART NUMBER,
    IP_PRTNAME - PART NAME,
    IP_CAVITY - CAVITY,
    IP_CYCTM - CYCLE TIME,
    IP_QTY - QUANTITY,
    IP_PLAN_DTFM - PLAN DATE FROM,
    IP_PLAN_DTTO - PLAN DATE TO,
    IP_PLAN_MNTH - PLAN MONTH,
    IP_MCNUM - MACHINE NUMBER

    Here I want to know if I entered the PLAN DATE FROM field I need to get PLAN DATE TO (date) automatically. So how to give the formula and where do I need to give that?

    The formula is mentioned below
    =((([IP_QTY]/(79200/[IP_CYCTM])*[IP_CAVITY]))+[IP_PLAN_DTFM])

    Please help me in this regard.

    Thanks in Advance

    Regards

    Lokesh Kamath

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    in database design; if your field is always calculated, and that formula will never change - - then there is no need to record the value in a table: in which case you would have an unbound field on your form - and in its properties for source you would put:
    =((([IP_QTY]/(79200/[IP_CYCTM])*[IP_CAVITY]))+[IP_PLAN_DTFM])

    and this value will display 'on the fly' whenever the form is opened.


    but if you do need to actually record the value - and are therefore only automating the humans data input - then you will have a bound field (let's call 'DateTo'). In which case one generally puts the action in the AfterUpdate event of which ever field will be used by the human to put in the last of the critically needed information. And so in that event you put:

    Me.DateTo=((([IP_QTY]/(79200/[IP_CYCTM])*[IP_CAVITY]))+[IP_PLAN_DTFM])

    hope this helps.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-06-2011, 06:36 PM
  2. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  3. set date field on form to date variable
    By laavista in forum Access
    Replies: 3
    Last Post: 06-28-2010, 03:03 AM
  4. Replies: 9
    Last Post: 03-19-2010, 10:37 AM
  5. Replies: 1
    Last Post: 12-09-2005, 10:29 PM

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