I am currently writing a program to update a file in a UniData database.. When I attempt to write to a field I get a Type mismatch error. Here is the code that I am working with.

Dim NewRecord As Object
Dim DRECORD As Object
Set DRECORD = Nothing

Set GLAdminFile = UVSession.OpenFile("BUDGET.MAN")
'Set NewRecord = CreateObject("UniVerse.DynamicArray.1")
GLAdminFile.recordid = lstUsers.Text
GLAdminFile.Read
Set DRECORD = GLAdminFile.RECORD
If chkAdmin Then
DRECORD.Field(1) = "Y" 'Happens here
Else
DRECORD.Field(1) = "N" ' or here
End If
For Index = 0 To lstUsrUnits.ListCount
If units <> "" Then
units = units & "" & lstUsrUnits.list(Index)
Else
units = lstUsrUnits.list(Index)
End If
Next Index
GLAdminFile.RECORD = "Y" & units
Set DRECORD = GLAdminFile.RECORD


Any help would be appreciated.

Please respond to my e-mail address.