Hello wise people,
maybe somebody can help me?
Here is the situation: I need to merge 2 table fields, one of which is "memo" data type and other is "text". The problem arises when I check if the memo data type field is empty. I tried checking if this field is equal to "Null" or "", but the function never find the field empty, even if it is. Does anybody have any suggestions? I would be very thankful, because the deadline is coming fast, and still there are many work to do
Here is my code:
maybe somebody can help me?
Here is the situation: I need to merge 2 table fields, one of which is "memo" data type and other is "text". The problem arises when I check if the memo data type field is empty. I tried checking if this field is equal to "Null" or "", but the function never find the field empty, even if it is. Does anybody have any suggestions? I would be very thankful, because the deadline is coming fast, and still there are many work to do

Here is my code:
Code:
Function sujungti()
Dim kontrole As ADODB.Recordset
Dim komentaras As ADODB.Recordset
Dim naujas As ADODB.Recordset
Set kontrole = New ADODB.Recordset
Set komentaras = New ADODB.Recordset
Set naujas = New ADODB.Recordset
kontrole.Open "SELECT * FROM tblJungtine1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
While Not kontrole.EOF
If kontrole.Fields("Aprasymas") = "" Then 'Field Aprasymas is memo type
kontrole!Bendra = kontrole.Fields("Kontroles") 'Field Kontroles is text type
Else
kontrole!Bendra = kontrole.Fields("Kontroles") & " (" & kontrole.Fields("Aprasymas") & ")"
End If
kontrole.Update
kontrole.MoveNext
apr = ""
Wend
kontrole.Close
Set kontrole = Nothing
End Function