Thanks for your reply. The function code is as below:-
Function Giza_Izena() As String
'============== =============== ============
'User Name
'============== =============== ============
Dim lngLen As Long
Dim strBuf As String
Const MaxUserName = 255
strBuf = Space(MaxUserNa me)
lngLen = MaxUserName
If CBool(TSB_API_G etUserName(strB uf, lngLen)) Then
Giza_Izena = Left$(strBuf, lngLen - 1)
Else
Giza_Izena = ""
End If
End Function
Function Makina_Izena() As String
'============== =============== ============
'Machine Name
'============== =============== ============
Dim lngLen As Long
Dim strBuf As String
Const MaxUserName = 255
strBuf = Space(MaxUserNa me)
lngLen = MaxUserName
If CBool(GetComput erName(strBuf, lngLen)) Then
Makina_Izena = Left$(strBuf, lngLen)
Else
Makina_Izena = ""
End If
End Function
It appears to me that the form does not like any statement in before update
event procedure. I have no other event procedure in the form that linked
with a parameter query.
Scott
<pi********@hot mail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
>
Scott wrote:
>>
If Me.Dirty Then
Me.[UpdatedOn] = Makina_Izena()
Me.[UpdatedBy] = Giza_Izena()
End If
Error message
Microsoft Office Access
The expression Before Update you entered as the event property setting
porduced the following error: A problem occurred while Microsoft Office
Access was communicating with OLE server or ActiveX control.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Even Procedure]
*There may have been an error evaluating the function, event, or macro.
It happened on some pcs but not all. I found the pcs which work without
the
error have comctl32.ocx installed and installed and registered it on
other
units. It did not help the issue. I have no idea other causes to it.
Can
someone shed any light to me for the possible causes and fixes.
Thanks!
Scott
Post the code for the two functions you're calling. the other stuff
doesn't use the comctl32 library at all. In other words, you've left
out the code that's causing the problem.