By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

Editing form-bound records with DAO (Access 97)

P: n/a
Hi,

I'm trying to check for a unique value index violation on a bound
field when done editing the field (before update, on exit, on lost
focus, etc), and when I find a violation change the value to the
default "filler" value (after a warning).

The problem is that Access considers the record locked by the bound
control(s), so I can't edit it using DAO. I've tried setting focus to
other non-bound controls, but this doesn't seem to work. I need a way
to force Access to release the record bound to the controls so I can
edit it with DAO. Any suggestions? Ideally there would be something
equivilant to Update in DAO, but I haven't found anything.

Thanks
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You want to test the value in a bound control, and alter it if it's not
suitable?

Use the AfterUpdate event of the control. You can assign a different value
in that event.

If you are actually getting engine-level messages before you can get out of
the control, you would need to use the Error event of the form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"DrFoo" <ar*@bc.com> wrote in message
news:qo********************************@4ax.com...
Hi,

I'm trying to check for a unique value index violation on a bound
field when done editing the field (before update, on exit, on lost
focus, etc), and when I find a violation change the value to the
default "filler" value (after a warning).

The problem is that Access considers the record locked by the bound
control(s), so I can't edit it using DAO. I've tried setting focus to
other non-bound controls, but this doesn't seem to work. I need a way
to force Access to release the record bound to the controls so I can
edit it with DAO. Any suggestions? Ideally there would be something
equivilant to Update in DAO, but I haven't found anything.

Thanks

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.