From: Steve Berg via AccessMonster.com on
Try putting it before the "Response=acDataErrAdded" line.


Kathy R. wrote:
>I'm sorry, I feel like I'm being particularly dense here. But I still
>can't figure out where to put the Me.Requery
>
>If I put it after the "Response=acDataErrAdded" or the after the "End
>If" line then I get an error at the CurrentDb.Execute strSQL,
>dbFailOnError line
>
>in the Debug window: Run-time error '3022' The changes you requested to
>the table were not successful because they would create duplicate values
>in the index, primary key, or relationship. Change the data in the
>field or fields that contain duplicate data, remove the index, or
>redifine the index to permit duplicate entries and try again.
>
>The player_name field in the table is set to Indexed, no duplicates
>
>The combobox is unbound with the Record Source
>SELECT [Player_tbl].[playerID], [Player_tbl].[player_name] FROM
>[Player_tbl] ORDER BY [player_name];
>
>The bound column is 1
>
>If I've understood it correctly, the combobox does not need to be
>requeried because that's what acDataErrAdded does.
>
>Again, thank you for your help and patience!
>
>Kathy R.
>
>> Me always refers to the current form (or report), so Me.Requery will requery
>> the form reguardless of where you put it. To requery the control would be Me.
>[quoted text clipped - 10 lines]
>>>>> Set rs = Nothing
>>>>> End Sub

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200909/1

First  |  Prev  | 
Pages: 1 2
Prev: lost focus
Next: Add a wait time.