Results 1 to 2 of 2

Thread: Query

  1. #1
    Join Date
    Nov 2003

    Unanswered: Query

    Right on this form i want the users to select a category...then type name (this is what i have got it to do so far)...then in the third combo box i want the equip id of the last entery in the type name cobo box to appear.

    I have two tables:

    EquipmentItem..which includes:

    EquipmentItem.EquipmentID | EquipmentItem.WarrebtyExpiration | EquipmentItem.TypeID | EquipmentItem.LastPATTest | EquipmentItem.LastCalibration | EquipmentItem.OwnedHired

    EquipmentType...which includes:

    EquipmentType.TypeID | EquipmentType.SupplierID | EquipmentType.CalibrationReq | EquipmentType.PATTestReq | EquipmentType.TypeCategory | EquipmentType.TypeName |

    note! a category is such as combine harvester and it has two tyoes accoicated to it e.g. Standard Combine Harvester and Caterpillar Harvester

    on my form:

    cboCategoryName: (combo box): sql

    SELECT Category.CategoryID, Category.CategoryName
    FROM Category;

    cboTypeName: (Combo Box): sql

    SELECT EquipmentType.TypeName, EquipmentType.TypeID
    FROM EquipmentType
    WHERE (((EquipmentType.TypeCategory)=Forms![Select Bar Code]!cboCategoryName));

    Third combo box (not finshed cause dont know how to do it, but this is what i came up with) sql:

    SELECT EquipmentItem.EquipmentID
    FROM EquipmentItem, EquipmentType
    WHERE (((EquipmentItem.TypeID)=Forms![Select Bar Code]!cboTypeName)) And EquipmentItem.TypeID=EquipmentType.TypeID;

    ^^^^is there way i can rearrange this so i get the equipid for the selected typename????

    Any help would be most appreciated!!

    Many Thanks

    Lucy Goodwin

    p.s the db is on as well...the form is not on main for but unders forms under 'Select Bar Code' xxx

  2. #2
    Join Date
    Oct 2003

    SELECT EquipmentItem.EquipmentID
    FROM EquipmentItem, EquipmentType
    WHERE (((EquipmentItem.TypeID)=Forms![Select Bar Code]!cboTypeName));

Posting Permissions

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