Datepicker tabbing change setfocus (1 Viewer)

ECEK

Registered User.
Local time
Today, 19:20
Joined
Dec 19, 2012
Messages
717
I have a bound form with four date fields.
For brevity the user needs to input four dates.

I have disabled the manual entry.

The form opens with the focus on Date1 showing the datepicker.
I want to:
select a date, setfocus to date2,
select a date, setfocus to date3,
select a date, setfocus to date4,
select a date, setfocus to exit command button.

I have tries afterUpdate, Onchange, setfocus and still no luck !!

I do not want to have to tab between fields.

Any takers?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 19:20
Joined
Jul 9, 2003
Messages
16,282
I have tries afterUpdate, Onchange, setfocus and still no luck !!

I do not want to have to tab between fields.

Any takers?

Well the problem is you are not triggering the after update event.

I do have a solution to the problem of when the after update event is not triggered, but it involves opening a separate form to enter the dates.

But I think the "separate" Form could be opened programmatically, not sure because I don't know your workflow.

Also it requires some VBA code.

Sent from my SM-G925F using Tapatalk
 

isladogs

MVP / VIP
Local time
Today, 19:20
Joined
Jan 14, 2017
Messages
18,219
What code have you tried ...and what happens in each case?
 

ECEK

Registered User.
Local time
Today, 19:20
Joined
Dec 19, 2012
Messages
717
The only thing that I have tried is to setfocus to the next field on afterUpdate and OnChange.

I have also nullified manual entry of the date (as that causes problems)

The vba (yellows out) error just tells me that I can't go to the field.

I also wanted to populate an additional field Date5 with "Date1 - 12 months"
I can do all of these things if I tab.

Is this a bug with the datepicker?
 

isladogs

MVP / VIP
Local time
Today, 19:20
Joined
Jan 14, 2017
Messages
18,219
Not that I'm aware of.

After update should work if the textbox is being updated by the user entering data. On change is appropriate if the textbox is being updated via the datepicker.

Don't use both as they can cause conflicts.

Are you sure the on change event is firing? Try adding a debug line or a message box as a check.

If that doesn't solve it, you could try my Better Date Picker
 

missinglinq

AWF VIP
Local time
Today, 14:20
Joined
Jun 20, 2003
Messages
6,423
How, exactly, did you nullify manual entry of the date?

Linq ;0)>
 

ECEK

Registered User.
Local time
Today, 19:20
Joined
Dec 19, 2012
Messages
717
So I decided to rebuild my form and voila "On Change" works !!!!
Bizarre.
Sorry for wasting your time guys.

missinglink:

I put:

KeyAscii = 0

in the On Key Press property of the field
 

Users who are viewing this thread

Top Bottom