Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    price - invoise (2k)

    Hello all
    1- I have 3 tables ( 1st = tblsabic , 2nd = tbltrans , 3rd = tbltrans1)
    2- There are a relation between tbltrans and tbltrans1( D/no)
    3- tblsabic contain 4 fealds ( items

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: price - invoise (2k)

    You say that there is a relationship between tbltrans and tbltrans1 on D/no, but D/no is not in the list of fields of tbltrans1. Without a link between tbltrans and tbltrans1 there is no way to do what you want.

  3. #3
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: price - invoise (2k)

    sorry i forgot to write it .
    good notc

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: price - invoise (2k)

    OK.

    Should the user be able to change the price in tbltrans1 after it has been set automatically, or is the price in tbltrans1 completely determined by the price in tblsabic?

  5. #5
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: price - invoise (2k)

    the price in tbltrans1 completely determined by the price in tblsabic

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: price - invoise (2k)

    You can calculate the price in a query; there is no need to store the price in tbltrans1, since it is a derived value. See attached database.

  7. #7
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: price - invoise (2k)

    it is good but i want to store the prises in tbltrans1 couse i change these prises evry 3 monthes , also if is able the user change it .
    thanks

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: price - invoise (2k)

    You will have to do this in a subform based on the tbltrans1 table (the main form will be based on tbltrans). Change the price in the After Update event of the Item text box:

    Private Sub Item_AfterUpdate()
    Me.Price = CCur(DLookup("Price", "tblSabic", "Item='" & Me.Item & _
    "' AND Date1<=#" & Me.Parent.[Date] & _
    "# AND Date2>=#" & Me.Parent.[Date] & "#"))
    End Sub

    See attached database.

  9. #9
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: price - invoise (2k)

    That is ok Now .
    Thank u very much .
    Ashraf

Posting Permissions

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