Application.GUIDFromString Method
Access Developer Reference |
The GUIDFromString function converts a string to a GUID, which is an array of type Byte.
Syntax
expression.GUIDFromString(String)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
String | Required | Variant | A string expression which evaluates to a GUID in string form. |
Return Value
Variant
Remarks
The Microsoft Access database engine stores GUIDs as arrays of type Byte. However, Microsoft Access can't return Byte data from a control on a form or report. In order to return the value of a GUID from a control, you must convert it to a string. To convert a GUID to a string, use the StringFromGUID function. To convert a string to a GUID, use the GUIDFromString function.
Example
The following example uses the GUIDFromString function to convert a string to a GUID. The string is a GUID stored in string form in a replicated Employees table. The field, s_GUID, is a hidden field added to every replicated table in a replicated database.
Visual Basic for Applications |
---|
|
See Also