ansentry
Access amateur
- Local time
- Tomorrow, 00:33
- Joined
- Jun 1, 2003
- Messages
- 995
I have a form (frmPoints) with a subform (frmPointsDetail).They are linked by PointID (master) and pdPointID (child) they both work fine
On the subform (PointDetailsID)( PK) I have a combo box that has “Locations” (Kitchen, Bathroom1, Bathroom2,Lounge, Bedroom etc) this gets its information from tblLocations (table) and the result is stored in tblPointsDetail (table). This works fine, what I want to do is prevent the user from being able to use the same location twice (avoid duplicates) in the subform for each PointDetailsID, A House cannot have more that 1 “Bathroom2”
I have tried in a query that supplied data to cboLocations the following;
SELECT LocationID, Location
FROM tblLocations
WHERE LocationID Not In (
SELECT
LocationID
FROM tblPointsDetail
WHERE PointDetailsID Is Null);
But it does not work, any help would be appreciated
Regards,
On the subform (PointDetailsID)( PK) I have a combo box that has “Locations” (Kitchen, Bathroom1, Bathroom2,Lounge, Bedroom etc) this gets its information from tblLocations (table) and the result is stored in tblPointsDetail (table). This works fine, what I want to do is prevent the user from being able to use the same location twice (avoid duplicates) in the subform for each PointDetailsID, A House cannot have more that 1 “Bathroom2”
I have tried in a query that supplied data to cboLocations the following;
SELECT LocationID, Location
FROM tblLocations
WHERE LocationID Not In (
SELECT
LocationID
FROM tblPointsDetail
WHERE PointDetailsID Is Null);
But it does not work, any help would be appreciated
Regards,