can't see new records on sub form

  • Thread starter Thread starter nick_mleczko
  • Start date Start date
N

nick_mleczko

Hi,

Hope someone can help

I've got a medical application, where I'm playing with 1-to-1 tables
(heaps of fields) and pages/subforms

Now, when I create a new record (patient), I programmatically add all
the relevant records to all other tables that have relationships wit
the patient table. the prob is when I navigate to the subforms that are
meant to be displaying the info from these tables the records are not
seen. If I exit access and come back in, everything works fine.

Is it some sort of a refresh problem?

Thanks in advance
Nick
 
not Refresh. since you're adding records to the subform tables
*programmatically*, you need to Requery the subforms to return those new
records.

hth
 
Thanks,

requering the frmMain works but then takes you back to the first
record, not the one you just added.

So to get around that I've stored the added key to a temp table, in the
oncurrent() of the mainform I lookup that value, do a findfirst, delete
the value from the temp table and hey presto

Easy once you know

N
 
Back
Top