Run-time Error '-2147352567 (80020009)' The value you entered isn't valid for this fi (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 08:03
Joined
Sep 21, 2011
Messages
14,361
The Update button appears after you click on the Edit button.

Yes, I see now, but why do I appear to be the only one getting the focus error?, no one else has even mentioned it?
It happens as soon as the Edit button is pressed.

I know how to correct it and have done, but still?

I downloaded Arneglp's version and it still has that error? :confused:
 

sneuberg

AWF VIP
Local time
Today, 00:03
Joined
Oct 17, 2014
Messages
3,506
Yes, I see now, but why do I appear to be the only one getting the focus error?, no one else has even mentioned it?
It happens as soon as the Edit button is pressed.

I know how to correct it and have done, but still?

I downloaded Arneglp's version and it still has that error? :confused:

Looking at the code I don't understand why I'm not getting that error. I don't see anything changing the focus of the Edit button before it is disabled. When I click on the Edit button (my version) the focus seems to go to the Replace in the Find group of the ribbon. It must be an Access version thing. I have Access 2013.

But so that this works in all versions I suggest that the OP change the code to set the focus somewhere else before disabling the Edit button in the cmdEdit_Click code; perhaps

Code:
Me.stdid.SetFocus

before
Code:
Me.cmdEdit.Enabled = False
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:03
Joined
Sep 21, 2011
Messages
14,361
Sneuberg,

Yes I just used the first name field in the form, as I didn't think the ID control should have been enabled.

Code:
            'disable button edit
            Me.txtName.SetFocus
            Me.cmdEdit.Enabled = False

Different Access versions would probably explain it, as I would likely be on the lowest version. ;)
 

Users who are viewing this thread

Top Bottom