Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2012
    Posts
    15

    Unanswered: Form is sending ID number not info

    I have added a button on my form which sends the info to the table NDP, from there I have a query (Query3) that has all the info plus Total Price and discounted price. BUT the info being sent is the ID number, not the "16oz" or "70" or "5". Any help?
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    That is because they must be linked fields and you are seeing the primary key field. To see the required data you need to link in their tables and bring in the correct fields.
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    in your query you need to do whats called a join, used to join together two or more tables.

    add the other table(s) to the query designer and, assuming you have used the relationships tool) there should be a line linking the other tables. select the column(s) you want from the other tables

    if you cannot see a line between the two tables then I'd suggest you define realitonships between your tables. however you can create realtionships on the fly within a query by clicking on the parnet table and then dragging to the child table and specifying what column in table A matches in column B. but thats a kludgy workaround.. defien realitonships when using a realtional database such as Access
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jun 2012
    Posts
    15
    Quote Originally Posted by SoftwareMatters View Post
    That is because they must be linked fields and you are seeing the primary key field. To see the required data you need to link in their tables and bring in the correct fields.
    Where? how?

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    first off redefine your relationships so that they use / enforce referential integrity (RI)
    that may mean you need to modify your data to make certain it complies with the new relationship
    make certain that the datatypes of the columns that make the relationship are of the same type
    make certain you use the appropriate datatype for each column (that means dates in datetime datatype, numbers is a suitable numeric datatype)
    make certain you use an appropriate size for text/string datatypes. juyst because Access defaults to 255 characters doesn't mean you should use 255 characters, especially not in a primary key
    don' use spaces for column or table names it will bite you in the ass at some stage

    select my,column, list from mytable
    join anothertable on anothertable.columnanme = mytable.acolumnname

    or in your case
    Code:
    SELECT NDP.Name, NDP.Description, NDP.[PIN #], NDP.Size, NDP.Prices, NDP.Upcharges_Amt, [NDP]![Prices]+[NDP]![Upcharges_Amt] AS [Total Price], [Total Price]-[Total Price]*0.01 AS [Discounted Price], Can_Size.Size, Can_Size.Prices
    FROM Can_Size
    RIGHT JOIN NDP ON Can_Size.CanSizeID = NDP.Size;
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jun 2012
    Posts
    15
    Thank you I just figured it out! Very much appreciated!

Posting Permissions

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