Hi June7
Unfortunately you can't open my file. That is query of the form:
Code:
SELECT Device.DeviceID, Device.BrandID, Brand.Brand, Device.DevTypeID, DeviceType.DeviceType, Device.ModelID, Model.Model, Device.HardwareID, Hardware.HardWare, Device.Description
FROM Device
LEFT JOIN DeviceType
ON Device.DevTypeID = DeviceType.DevTypeID
LEFT JOIN Hardware
ON Device.HardwareID = Hardware.HardwareID
LEFT JOIN Brand
ON Device.BrandID = Brand.BrandID
LEFT JOIN Model
ON Device.ModelID = Model.ModelID;
That is query to populate cboModel:
Code:
SELECT Model.ModelID, Model.Model, 1 AS SortRow
FROM Model
WHERE (((Model.BrandID)=[Forms]![f_Device]![cboBrand]) AND ((Model.DeviceTypeID)=[Forms]![f_Device]![cboDeviceType]))
UNION SELECT 0, "Select Type", 0 FROM DeviceType
ORDER BY SortRow, Model.Model;
And that is query to populate cboHardware
Code:
SELECT Hardware.HardwareID, Hardware.HardWare, 1 AS SortRow
FROM Hardware
WHERE (((Hardware.BrandID)=[Forms]![f_Device]![cboBrand]) AND ((Hardware.DeviceTypeID)=[Forms]![f_Device]![cboDeviceType]))
UNION SELECT 0, "Select Hardware", 0 FROM Hardware
ORDER BY SortRow, Hardware.HardWare;
The combo box cboModel works properly, and in combo box cboHardware I can't select value. But code of queries is similar. Where is problem?
Thanks