Rabu, 16 Januari 2019

Re: [MS_AccessPros] How to get the first letter of an inputBox

 

Dear Crystal,
Thanks for your help.
Best Regards,
Kevin

发自 WPS邮箱客戶端
在 "crystal 8 strive4peace2008@yahoo.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2019年1月17日 03:02写道:

 

Hi Kevin,

it is good to save the value returned by InputBox to a string and test to determine what to do

'~~~~~~~~~~~~~~~~~~~
   Dim sInput As String _
      , sValue as string

    sInput = InputBox("MyMessage")

   If sInput <> "" Then 'user didn't Cancel
     'get first character
      sValue = left(sInput,1)
   End If
'~~~~~~~~~~~~~~~~~~~

WHERE:
    sValue is the first character

have an awesome day,
crystal

free code you can use in your projects
https://msaccessgurus.com/code.htm


On 1/16/2019 9:56 AM, Peter Randløv randlov@post9.tele.dk [MS_Access_Professionals] wrote:
Hi Kevin
The following code shows the two first letters of LBNR, which has the format AB1234:
Me.Image12.Picture = strSAMLINGdrev & Left([LBNR], 2) & "\" & [LBNR] & ".jpg"
Where strSAMLINGdrev is as path so the picture shown will be e.g. D:\RODS\SAMLING\AB\AB1234.jpg
Does it work for you?
Peter 
Den 16-01-2019 kl. 16:22 skrev Qingqing qingqinga@yahoo.com [MS_Access_Professionals]:
 

Dear All,
How do we get the first letter of an inputbox? For example, if I type "a123", how the I get the "a"? Thanks.
Best Regards,
Kevin


__._,_.___

Posted by: qingqinga <qingqinga@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)

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