Results 1 to 11 of 11
  1. #1
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149

    how to capture Chinese characters


    I create a list form with 4 combo to filter the records.
    Click image for larger version. 

Name:	filter.png 
Views:	22 
Size:	17.9 KB 
ID:	47056
    If click a "Test" on Status combo, it shows on "Test" status records.
    However, if select a value in the PriceType combo, it shows nothing.
    The PriceType's combo name is Filter2cbo.
    When debug to step into the code, it shows the Me.Filter2cbo is "??".
    Code:
        If Me.Filter2cbo <> "" Then
            FormFilter = "[PriceType] = '" & Me.Filter2cbo & "'"
        End If
    How to convert "??" to its real value?
    Thanks.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    you have a mixture of fonts and suspect you need to change your language settings. - see this link https://social.msdn.microsoft.com/Fo...board-language

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    Or maybe the combo rowsource is from a query that groups by on a memo field. Have seen this before, but in queries, not forms.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    Thanks Ajax.
    I try the methods in your URL.
    It does not work.

    Thanks Micron.
    I don't find a memo field type in Access table.
    I try set the combo rowsource to query a "Long Text" table field, but it does not work.
    Can you explain more?

  5. #5
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    After try the methods in Ajax URL, I can see the Chinese characters in debug mode.
    The FormFilter is set to [PriceType]="上路", but it cannot shows 上路 records.
    I try enter SELECT * FROM customer WHERE [PriceType]="上路" in the Query Designer.
    It also return no record. Strange!
    Is it the problem that I am using Link Table to SQL Server?
    The PriceType is nvarchar(10) data type.

  6. #6
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    Quote Originally Posted by uoghk View Post
    Thanks Ajax.
    I try the methods in your URL.
    It does not work.

    Thanks Micron.
    I don't find a memo field type in Access table.
    I try set the combo rowsource to query a "Long Text" table field, but it does not work.
    Can you explain more?
    Sorry, I forgot that memo field type was changed to "long text" some time back. Essentially, they are one and the same thing. So if you're grouping on a long text field it's the same thing.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Join Date
    Apr 2017
    Posts
    1,679
    You can identify/recreate any character of any language using it's unicode value. So create an udf, which reads an unicode value of character, and another one, which returns the character from it's unicode value, and the use those udf's in your query. Also, in case there is a limited set of those chinese characters/expressions, you can have a translation table with columns for character/expression and matching filter conditions - maybe then you'll do without udf's.

  8. #8
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    thanks ArviLaanemets
    not quite understand to create udf about unicode value.
    can you give me sample?

  9. #9
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  10. #10
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    I finally set the table's collation to Chinese_Hong_Kong_Stroke_90_CI_AS, then I can query with Chinese characters.

  11. #11
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Great news, thanks for letting us know!
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Embedding Maps & Chinese Characters
    By wesley8503 in forum Access
    Replies: 3
    Last Post: 03-22-2016, 10:12 PM
  2. Replies: 2
    Last Post: 12-04-2013, 03:58 PM
  3. Replies: 1
    Last Post: 10-31-2013, 09:01 AM
  4. (bug) Chinese characters
    By JeroenMioch in forum Access
    Replies: 1
    Last Post: 08-09-2013, 09:15 AM
  5. Chinese Characters on Reports
    By caddadd in forum Reports
    Replies: 2
    Last Post: 02-04-2010, 02:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums