ACC2000: "????????" Is Displayed as the Value of a SQL Server GUID Field (278099)
The information in this article applies to:
This article was previously published under Q278099 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you use Visual Basic for Applications (VBA) code to retrieve and display the value of a Jet Replication ID or a SQL Server Unique Identifier(GUID) field, you get a value of "????????".
CAUSE
A GUID is a 16-byte array that Microsoft Access does not know how to interpret unless the data is converted.
RESOLUTION
To enable Access to properly interpret and display a GUID field, convert the GUID field to a string by using the StringFromGUID() function. For example, when you run the following code against an open form with a GUID field in its record source, you will see a string of hexadecimal numbers enclosed in braces preceded by the word "guid" and enclosed by another set of braces.
Note that
Debug.Print StringFromGUID(Forms![FormName]![GUIDFieldName])
is displayed something like this:
{guid {3B9B63A3-863D-11CF-8CAE-00AA00C0016B}}
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
197916 HOWTO: Use GUIDs w/ Access, SQL 6.5 and SQL 7
For more information about the StringFromGUID function, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type stringfromguid function in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 12/12/2002 |
---|
Keywords: | kbdta kbprb KB278099 |
---|
|