I'm having trouble assigning a GUID value using a RecordSet, using MS Access. I get a data type conversion error when trying the below code. What is the correct way to assign a GUID value to a GUID field in a recordset?
Code:Dim rst As Recordset Set rst = Me.BehaviorDetail_subform.Form.RecordsetClone MsgBox StringFromGUID(Me.FormID.Value) 'shows the correct guid string, so the value is there If rst.RecordCount = 0 Then 'add new time records for row rst.AddNew rst!FormID = Me.FormID '<-- problem is here. FormID is GUID type in recordset, Me.FormID is a bound textbox that has a valid GUID object rst!TimeID = 1 rst.Update ......




Reply With Quote