allow additions problem with subform field

G

Guest

Hi all
I have a continuous subfrom on a main form. This subform is is set not to
allow additions. A button on the main form then allows additions on the
subform.

On this subform is a single field with an input mask >AAAAAAAA (ie 8
characters, capitals or numbers, required.) This mask works fine, but there
is one problem which I cannot work out how to solve. As soon as a single
character is typed into the field, a new, blank field appears below (ie a
space for the next record to be entered, since the subform is set to Allow
Additions.) If the user then clicks deletes the entry in the field using the
backspace key and hits tab, a blank field is entered into the box and the
input mask is bypassed!

How can I overcome this? I have tried setting allow zero-length string to
no (in the field in the underlying table) but the form still allows this to
happen. Although the blank field is never allowed to be saved, it is still
causing complication in that several different error messages are generated
and it's taking a while to sort this all out and make the user experience
consistent.
Is there a simple piece of code that could prevent all this?

Thanks
rich
 
L

Lynn Trapp

G

Guest

Thanks Lynn.
I have sorted this using your technique plus custom error messages for
different situations.
rich
 

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