Kamis, 29 Oktober 2015

Re: Re: [MS_AccessPros] Re: Returning alphabet "a"

 

Tony-
This is a very good idea. It can handle complicated strings instead of alphabet. Thanks a lot.
Best Regards,
Kevin



在 "Tony V Meece mr_7ony@yahoo.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015年10月29日 下午7:38写道:

 

May I suggest using a formula like
=Dmax ("myfield","mytable","recid=" & recID)
Should return the value of myfield last used in mytable... use whatever unique identifier you wish for the 3rd part of this. That depends on the unique indexing you have for your group of tables. 

Good luck. 
7ony

Sent from my Verizon Wireless 4G LTE smartphone


-------- Original message --------
From: "'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals]"
Date:10/29/2015 5:45 AM (GMT-05:00)
To: MS_Access_Professionals
Subject: Re: Re: [MS_AccessPros] Re: Returning alphabet "a"

 

Crystal-
Thank you very much.
Best Regards,
Kevin


Regards,
Kevin Zhao
 
Date: 2015-10-29 06:54
Subject: Re: [MS_AccessPros] Re: Returning alphabet "a"
 

here is some code I wrote to get column letters for Excel ...

if there are more than 26 values, it will then return AA, AB, ... AZ, BA, BB, ...

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Function GetColumnLetter(pCol As Long) As String
'130116 strive4peace
   If pCol <= 26 Then
      GetColumnLetter = Chr(pCol + 64)
   Else
      GetColumnLetter = Chr(Int((pCol - 1) / 26) + 64) _
         & Chr(((pCol - 1) Mod 26) + 65)
   End If
End Function
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if lowercase is desired, the return value could be wrapped with LCase

warm regards,
crystal

~ have an awesome day ~


On 10/28/2015 12:37 PM, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] wrote:
Crystal,
 
I have used this many times but it's still a bit easier coding without converting, incrementing, and converting. I also have concerns about upper and lowercase values having different CHR() values, differences in languages, and what happens if there is a need for more than 26 sequence values.
 
Duane Hookom, MVP
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Wed, 28 Oct 2015 10:20:15 -0600
Subject: Re: [MS_AccessPros] Re: Returning alphabet "a"



chr(97) is "a"

On 10/28/2015 8:42 AM, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] wrote:
It seems that a lot of the previous replies have not been included in your reply. Could you provide the significant table and field names as well as some sample data?
 
Do you really need to use a, b, c, ... or would 1, 2, 3,... work (it's easier to code).
 
Duane Hookom, MVP
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Wed, 28 Oct 2015 12:10:13 +0800
Subject: Re:RE: [MS_AccessPros] Re: Returning alphabet "a"

Duane,
The sequence is the PartID.
Best Regards,
Kevin



在 "Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015 年10月28日 上午11:48写道:



 
Kevin,
You haven't provided any field or fields that determine the sequence of the different services so you may be stuck manually entering a, b, c,...

Duane Hookom, MVP
MS Access


To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Wed, 28 Oct 2015 07:16:29 +0800
Subject: Re:[MS_AccessPros] Re: Returning alphabet "a"

Bill-
I realized it. The reason I want an alphabet appearing automatically is that I want to divide a long travel Itinerary into parts according to different services booked, e.g.     air ticket, coach, etc. So with the alphabet I can name the parts as a,b,c...etc. Is that possible to get this done? Thank you Bill.
Best Regards,
Kevin



"wrmosca@comcast.net [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015 年10月28日 上午12:30写道:



 
Kevin

Perhaps you should clarify what business rule you are needing? One thing to keep in mind...double-click also triggers a single click event if one exists.












__._,_.___

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

.

__,_._,___

Tidak ada komentar:

Posting Komentar