Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2003
    Posts
    12

    Question define calculate field when design table

    If i have a form included the following fields like below:

    Book Name: Adobe Photoshop
    Book Description: black-white 500
    Book Color: black-white
    Page: 500

    When user enter Book Name, Book Description e.g black-white 500, it will automatically fill Book Color and Page depend on Book Description. So, the Book Color and Page field are the calculated fields? So do i need to include Book Color field and Page field when design table?

    Thanks.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: define calculate field when design table

    Originally posted by gobeach
    If i have a form included the following fields like below:

    Book Name: Adobe Photoshop
    Book Description: black-white 500
    Book Color: black-white
    Page: 500

    When user enter Book Name, Book Description e.g black-white 500, it will automatically fill Book Color and Page depend on Book Description. So, the Book Color and Page field are the calculated fields? So do i need to include Book Color field and Page field when design table?

    Thanks.
    You have it backwards. The Book Color and Page are the base data, and Description is the calculated (derived) value, i.e. Book_Color+" "+Page

    Just suppose you have 1000 books in your table and you want to find out how many books are there with over 400 pages. How would you get that from the Description?

    Also, what if the user entered "black white" in Description. What is the calculated value for Page then - "white", 0, NULL???

  3. #3
    Join Date
    Apr 2003
    Posts
    12

    Re: define calculate field when design table

    Thanks.
    I had it backwards. But it's just an example to define fields in table.
    As you way, the user should enter Book Color, Page first e.g Book Color: Black, Page:500 and then Book Description: Black 500
    So, Book Description is calculated depend on Book Color and Page.
    My question is do i need to define Book Description field when i design table?


    Originally posted by andrewst
    You have it backwards. The Book Color and Page are the base data, and Description is the calculated (derived) value, i.e. Book_Color+" "+Page

    Just suppose you have 1000 books in your table and you want to find out how many books are there with over 400 pages. How would you get that from the Description?

    Also, what if the user entered "black white" in Description. What is the calculated value for Page then - "white", 0, NULL???

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: define calculate field when design table

    Originally posted by gobeach
    Thanks.
    I had it backwards. But it's just an example to define fields in table.
    As you way, the user should enter Book Color, Page first e.g Book Color: Black, Page:500 and then Book Description: Black 500
    So, Book Description is calculated depend on Book Color and Page.
    My question is do i need to define Book Description field when i design table?
    No, because it would be redundant. You can always derive the description when needed. Or you could have a view that does it.

  5. #5
    Join Date
    Apr 2003
    Posts
    12

    Re: define calculate field when design table

    Got it. Thanks a lot.


    Originally posted by andrewst
    No, because it would be redundant. You can always derive the description when needed. Or you could have a view that does it.

Posting Permissions

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