[AccessD] A2010: vbBackspace or vbKeyDelete not recognised

Bob Walsh BWalsh at healthinsight.org
Wed Nov 21 10:47:53 CST 2018


Look here too

https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/miscellaneous-constants


From: AccessD <accessd-bounces at databaseadvisors.com> On Behalf Of Arthur Fuller
Sent: Wednesday, November 21, 2018 8:17 AM
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Subject: Re: [AccessD] A2010: vbBackspace or vbKeyDelete not recognised

[Attn: This is an external email.]

Clever workaround! But the question (put to MS, not you) is, why is that
key not supported? It makes me wonder what other keys on the numpad are not
supported, such as "/", "*", "-" and "+", also also the decimal point.
Somewhere I had a list of all the vb constants, but cannot locate it at the
moment. A quick Google located it: vb constants list
<https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/constants-and-enumerations<https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/constants-and-enumerations>>,
in case anyone's interested.

Arthur

On Wed, Nov 21, 2018 at 2:04 AM Darren - Active Billing <
darren at activebilling.com.au<mailto:darren at activebilling.com.au>> wrote:

> And...ignore me
>
> I used Len() minus 1 to resolve it
>
> Actual code if anyone is interested:
>
> Private Sub cmdBackSpace_Click()
> On Error Resume Next
> Dim strText As String
> strText = Left(txtDisplay, Len(txtDisplay) - 1)
> txtDisplay = strText
> End Sub
>
> Many thanks.
>
> Darren
>
>
> On 21/11/18, 11:19 am, "AccessD on behalf of Darren - Active Billing" <
> accessd-bounces at databaseadvisors.com<mailto:accessd-bounces at databaseadvisors.com> on behalf of
> darren at activebilling.com.au<mailto:darren at activebilling.com.au>> wrote:
>
> Hi Team,
>
>
>
> Just writing a simple touch pad/num pad for entering numbers into a
> field (For a Touch screen POS app – No mouse/keyboard interactions)
>
>
>
> Found some code on the ‘nets and it’s working nicely for the most part
> except for Backspace/Delete.
>
>
>
> 12 Buttons on the screen – All assigned 0 through to 9 and one for
> “Enter” and one for “Backspace/Delete”. Simple enough.
>
>
>
> Here’s the code
>
>
>
> Option Compare Database
>
> Option Explicit
>
>
>
> Private Sub TypeAlphaNum(intKeyCode As Integer)
>
> Screen.PreviousControl.SetFocus
>
> Me.txtDisplay.Value = Me.txtDisplay.Value & Chr(intKeyCode)
>
> End Sub
>
>
>
> Private Sub cmd0_Click()
>
> TypeAlphaNum vbKey0
>
> End Sub
>
> Private Sub cmd1_Click()
>
> TypeAlphaNum vbKey1
>
> End Sub
>
> Private Sub cmd2_Click()
>
> TypeAlphaNum vbKey2
>
> End Sub
>
>
>
> And so on for all keys/buttons.But it fails in the on click of the Key
> assigned for vbBackSpace
>
>
>
> I have also tried vbKeyDelete too – this one just adds dots to the
> ‘display’
>
>
>
>
>
> The line below just errors out – Compile Error Variable Not Defined
>
>
>
> Private Sub cmdBackSpace_Click()
>
> TypeAlphaNum vbKeyBackspace
>
> End Sub
>
>
>
> Have also tried
>
>
>
> Private Sub cmdBackSpace_Click()
>
> Dim vbKeyBackspace as integer
>
> TypeAlphaNum 8 ‘and various other combinations of numbers
>
> End Sub
>
>
>
>
>
> And this just adds dots at the end of the display
>
>
>
> Private Sub cmdBackSpace_Click()
>
> TypeAlphaNum vbKeyDelete
>
> End Sub
>
>
>
> Any suggestions?
>
>
>
> Many thanks in advance.
>
>
>
> Darren
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com<mailto:AccessD at databaseadvisors.com>
> http://databaseadvisors.com/mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
> Website: http://www.databaseadvisors.com<http://www.databaseadvisors.com>
>
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com<mailto:AccessD at databaseadvisors.com>
> http://databaseadvisors.com/mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
> Website: http://www.databaseadvisors.com<http://www.databaseadvisors.com>
>


--
Arthur
--
AccessD mailing list
AccessD at databaseadvisors.com<mailto:AccessD at databaseadvisors.com>
http://databaseadvisors.com/mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
Website: http://www.databaseadvisors.com<http://www.databaseadvisors.com>

________________________________
HealthInsight is a private, nonprofit, community-based organization dedicated to improving health and health care, with offices in four western states: Nevada, New Mexico, Oregon and Utah. HealthInsight also has operations in Seattle, Wash., and Glendale, Calif., supporting End-Stage Renal Disease Networks in the Western United States. The information and any materials included in this transmission may contain confidential information from HealthInsight. The information is intended for use by the person named on this transmittal. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies.


More information about the AccessD mailing list