after insert record it not show on the form.

  • Thread starter Thread starter kittip
  • Start date Start date
K

kittip

Guest
I use Access to retrive the data via MyODBC.
I have a form that has a filter (combo box) to find the record that use want to see.
When I use that filter to find a record (say record X) then I add new record. I can not see that new record show on neither my combo box or my form. I also got "#DELETE" on every field on my form too!!
I think may be I need to use ME..requery ( in form_afterinsert ) to retrive the new record that I just add. (some books said that will aviod the "#DELETE" problem )
But !!!
When I requery the form, the form will requery (now I got the new record that I just add. Seems like "#DELETE" problem solve ) But the form will go to the record X instate of requery and stay on the new record that I just insert.

Basically I want to solve the problem about got "#DELETE" in every field on my form after I insert a record. But when I follow some recommend to requery the form I got another problem about it not stay on that record it go the the prier record before I insert a new one.

Anyone who know about this please let me know as soon as possible,

Many thanks in advance
 
The reason that you see record X is that your filter is still set for that. Update your filter to the new record you want to see and that should solve the problem, you can also use the recordsource property. You could put a query in there that was tied to a field on your form, that contains the value of the new record. This field does not have to be visible to the user.
 

Users who are viewing this thread

Back
Top Bottom