Question : Duplicating Records In Access Form

When I select a user from a combo box it is adding the same (duplicating) user to a tblcomputerspec, something which I do not want it to do.

I have attached the code below

Thanks - Stewart

Answer : Duplicating Records In Access Form

<
I only want to add new record if I manually key in a user that does not exist in the drop down,>  

Use an UNBOUND combo box, set the Limit to List to yes and look at this link on how to add records using the NotinList event

http://support.microsoft.com/?kbid=197526

in the afterupdateEvent of the combo, filter the form or find the record

'filtering the form
private sub combo1_afterupdate()
me.filter="[FieldName]=" & me.combo1  ' use this if [FieldName] to filter is Number
me.filteron=true

end sub

me.filter="[FieldName]='" & me.combo1 &"'"  ' use this if [FieldName] to filter is TEXt Data type




 
Random Solutions  
 
programming4us programming4us