Dear Graham,
I am not familiar with debugging technique, but I'll follow your instruction. Thanks a lot.
Best Regsrds,
Kevin
发自 WPS邮箱客戶端
在 "graham@mandeno.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2019年1月17日 03:43写道:
Hi Kevin
You need to be more specific than to say "the above code doesn't work".What DOES the code do? Are you familiar with debugging techniques? I suggest you set a breakpoint on the line that begins "If Left(...". Then, when your code stops there, you can examine strInputBox by typing in the Immediate window:?strInputBoxYou can then press the F8 key to step through the code one line at a time. You will then see if the code enters the If ... Then block.Actually, I can't see anything wrong with this code snippet, so maybe the problem is occurring somewhere else.By the way, I hope you have "Option Explicit" at the top of EVERY code module. You do not appear to be declaring several variables, although these might be declared elsewhere.Best wishes,Graham [Access MVP 1996-2016]
---In MS_Access_Professionals@yahoogroups.com, <qingqinga@...> wrote :Dear All,
How do we get the first letter of an inputbox? For example, if I type "a123", how the I get the "a"?
By the way, here's what I have tried:
Dim strInputBox As String
strInputBox = InputBox("Please enter the ID.", "")
If Left(strInputBox, 1) = "a" Then
strfrm = "frmTransaction"
strID = "TransactionID"
strFormTable = "tblTransaction"
End If
But the above code doesn't work.
Best Regards,
Kevin
Zhao LiQing
__._,_.___
Posted by: qingqinga <qingqinga@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
SPONSORED LINKS
.
__,_._,___
Tidak ada komentar:
Posting Komentar