> In this instance i am setting the forms recordsource using a
> "select..." statement and specifying a specific ID in the where clause.
>
> When i use the form to create a new record (DoCmd.GoToRecord , ,
> A_NEWREC) and then saving the record using (DoCmd.RunCommand
> acCmdSaveRecord0 i get the error, this is because i am using a new ID
> which of course does not fit the original select statements criteria.
>
> Would this be corrected if i used a ADODB recordset for the forms
> recordsource.
>
> Sylvain Lafontaine (fill the blanks, no spam please) wrote:
>> Not sure what you mean by adding a new record: are you using a bound
>> form,
>> an ADODB recordset or manipulating directly the database with an INSERT
>> statement?
>>
>> Usually, adding a ResyncCommand, setting the UniqueTable property and
>> make
>> sure that all the stored procedures have the SET NOCOUNT ON option set at
>> their beginning should give ride of this problem.
>>
>> Take a look with the SQL-Server profiler to make sure that you are really
>> knowing what's happening on the SQL-Server when this error message
>> occurs.
>>
>> --
>> Sylvain Lafontaine, ing.
>> MVP - Technologies Virtual-PC
>> E-mail:
http://cerbermail.com/?QugbLEWINF>>
>>
>> "NoClue" <paul_rgill[ at ]hotmail.com> wrote in message
>> news:1159540937.538068.310500[ at ]m7g2000cwm.googlegroups.com...
>> >I get the following error when adding a new record to the underlying
>> > recordset of my form:
>> >
>> > data added database won't displayed form because doesn't satisfy
>> > criteria underlying record source.
>> >
>> > The reason is because i am selecting the record set based on a specific
>> > ID, which is an autonumber in my sqlserver database. When i create a
>> > new record the error above appears because the new record has a new ID
>> > which does not fit the original recordset source.
>> >
>> > Does anyone know away around this?
>> >
>> > e.g. modifying the recordset source dynamically
>> >
>> > Thanks in advance.
>> >
>