Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runsql macro keeps saying duplicate

Status
Not open for further replies.

waymond

Programmer
Mar 1, 2005
118
US
INSERT INTO [Object] ( as400narr, Lib, Name, Type )
SELECT OBJP1.ODOBTX, OBJP1.ODLBNM, OBJP1.ODOBNM, OBJP1.ODOBTP
FROM OBJP1
WHERE (((OBJP1.ODLBNM)=[Forms]![Object]![cboODLBNM]) AND ((OBJP1.ODOBNM)=[Forms]![Object]![cboODOBNM]));

this tied to the last combo box as soon as the user selects last combo data the message pops up this would produce duplicate records which is not true. When I look at the table it does record the data
 
You may try to replace this:
SELECT OBJP1.ODOBTX,
By this:
SELECT DISTINCT OBJP1.ODOBTX,

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top