ACC: How to Display Line Numbers on Subform Records

A

Access User

Out of curiousity, I removed the validation rule/text from the sub-form and
placed your suggesteds into the sub-table itself. When the user tries to
exceed the 4 limit, the message that results is from "Microsoft Visual Basic"
and gives that familiar refrain about "Run time error '-2147352567
(80020009): Only four Aneurism entries are allowed". I'll grant this is
terser and not as outerworldly as the generic one I cited but it gives the
user the unwanted opp'y to hit the 'Debug' button. True, that can be SOP-ed
out, but I just have to think that there's a way to get a msgbox to the user
that undoes the attempted 5th record and removes that said temptation. No?
 
A

Access User

I should've tried clicking the 'End' button because when I do I find that
nothing I do after that lets the user out of the sub-form....the same error
message recurs over and over..
 
M

Marshall Barton

Access said:
While there's something to be said for preventing users from circumventing
forms, this database is slotted to be entered by a single (volunteer,
trusted) users over a period spanning six months until study data is entered
and then an analysis involving other software of its contents exported
begins.

The composite PK (uses ID and Aneurism) I would think prevents non-unique
entries, but go ahead and correct me if otherwise.

I thought I mentioned that I had a validation criterion (<4) already in the
field and that that strange error message was trapping it. Perhaps I ought to
use yours instead along with the verbiage you're suggesting, but don't you
think one of 'error' type messages that are incorporated into some
conditional logic wrapped inside the validation rule + msgbox is the way to
go. I'm more concerned that the high schooler who does the data entry not get
confused by the opaquely worded native error msges I cited in my earlier
posting.


The composite PK should take care of the uniqueness issue.

I don't understand what you want out of the default error
message. The ValidationText property is provided so you can
easily provide a message directly related to your
application instead of a some kind of duplicate key message.
Maybe I don't understand what is causing the message and
it's unrelated to the validation rule??
 
M

Marshall Barton

Access said:
I should've tried clicking the 'End' button because when I do I find that
nothing I do after that lets the user out of the sub-form....the same error
message recurs over and over..


Of course the message will continue to appear. The invalid
entry is still there. Either change it to a vaild entry of
hit the Esc key twice to undo the changes.
 

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