On lost focus with a Split Form (1 Viewer)

ECEK

Registered User.
Local time
Today, 14:18
Joined
Dec 19, 2012
Messages
717
I wish to make a field compulsory by using the lost focus (unless there is anothe solution of course)

I open my Split Form to the first record. I also have a Tab field set to Tab Order 0. This takes the focus away from other fields.

I have a few lost focus on certain fields which work fine.

What I want to do is create the lost focus on the record and not on a specific field.

I tried to put it in the Tab field but this doesn't LOSE focus when I move to another record.

I will try two tabs to bounce the focus and report back.

In the meantime any thoughts are much appreciated.
 

isladogs

MVP / VIP
Local time
Today, 14:18
Joined
Jan 14, 2017
Messages
18,213
Set the field to Required=Yes in the table design?

BTW split forms are not easy to work with if you want anything other than the default settings
 

ECEK

Registered User.
Local time
Today, 14:18
Joined
Dec 19, 2012
Messages
717
Hi Ridders
That's not what I'm looking for. The field could be blank.
My solution was to put my code into everyfield's lost focus. This is how people select the records (in the datasheet part of the split form). It works but a bit long winded.
 

Minty

AWF VIP
Local time
Today, 14:18
Joined
Jul 26, 2013
Messages
10,371
Usually you validate data in the forms BeforeUpdate property, this fires before the record is saved, and applies to all fields.

It has a cancel event so if any data fails you set cancel = true , explain what was wrong via msgbox and exit the sub, without the record being saved.

Note that as Ridders pointed out , split forms don't always play nice...
 

Users who are viewing this thread

Top Bottom