Issues editing form items after calling form.Requery

A

Andrew Backer

Hello,

Having a bit of a problem after conversion to an ADP. I call
<form>.Requery after I have added a new record to a form, and the
record shows up. However, I can't click on it, edit it, or do nething.

1. click fancy button
2. call a stored proc which adds the record to the details table
3. call me.subDetails.Requery
4. new record shows up
5. click on the new record (can't edit, select, etc)

the detail form setup :
a) bound to a view
b) linked (parent/child) to the main form
c) updateable snapshot
d) allow filters/edits/deletions : yes (for now)

Is there something I should be doing? Other than changing what it was
bound do and doing tricks to get sorting, nothing has changed from the
MDB version which worked just fine

Thanks,
Andrew Backer
 
S

Sylvain Lafontaine

Probably a missing primary key or unique table but sometimes, subforms can
be tricky.
 
A

Andrew Backer

Still fussing with it. This is really annoying.

Form is bound to a view, which included two tables (one lookup).
Removed the second table to be safe. Both tables always had a PK.
UniqueTable is set to the proper table.

sp_help on the view reports an indentity column (as it should), but no
identity.

Changed the subform to use the table directly, and it still does not
work.

Every now and then some combination of refresh/requeryetc will cause it
to work, but it's pretty rare.

Anyone at MS have any idea what the heck is going on? Bascially I am
calling refresh/requery on a linked child form, and new records (that
were added beind "our" back) are showing up but I am unable to edit
them...

Thanks,
Andrew Backer
 
A

Andrew Backer

[solved] , i think

What I have to do is call Me.subContainer.Requery.

I was calling Me.SubContainer.Form.Requery/Refresh...

I pass typed form refrences to a function which does the manipulation
(and treats the forms kinda like objects) of retrieving values from the
forms, etc, since they are used in many locations. The calls look like
: DoStuff(me.subContainer.Form).

When I call requery on the container directly after the main call, it
works just fine. I will rewrite it to take a reference to the subform
object, and not the form object inside it, if I can.

- Andrew Backer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top