Can you post your SQL statement?
Cyberwolf0000 wrote:
[Quoted Text] >I have a table that has data entered in 2 ways. One way is when it is >entered on a subform of another form. The other is a stand-alone form. The >underlying table structure is as follows: > >ReasonCodes - ReasonCodeID(PK) >RPPCauseInfo - RPPCauseInfoID(PK) - ReasonCodeID(FK) > >I have a one-to-many relationship between ReasonCodes(One) and RPPCauseInfo >(Many). > >When data is entered via the subform everything works fine. But, when I have >the stand-alone form open, I have Code that adds a record to the ReasonCodes >table using a SQL INSERT INTO statement. The record gets added fine, but >when I go to move away from the record I get an error "The Microsoft Jet >database engine cannot find a record in the table 'ReasonCodes' with key >matching field(s) 'ReasonCodeID'" I have tried doing a requery on the form >but that did not help. I believe it is because of the One-To-Many >relationship. That is why I add a record to the ReasonCodes table to enforce >the integrity. Is there a way to requery the ReasonCodes table so that the >record is recognized? > >Can anyone tell me why this happens? >
-- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1
|