AccessError(DataErr) contains @ symbol

  • Thread starter Thread starter S.L.
  • Start date Start date
S

S.L.

Hi, My Form_Error uses AccessError(DataErr) to display message. But message
always contain symbol like @ or @@1. I think these symbols normally
replaced by some word if displayed directly under control of MS Access
itself.

So, Can AccessError(DataErr) capture the correct message ?

TIA
 
Why are you using AccessError? Why not just use the Description property of
the error object?
 
Hi,

I think you'll find that the @ symbol used in a
messagebox are a throw-back to when Access had its own
version of Basic code. It would allow you to format the
text in the messagebox so that the first line was in
bold, and would put a new line in at the end of that.
Unfortunatately, this doesn't function in VBA code, so
the @ symbol is simply displayed. Personally, I did a
Find & Replace to replace the @ symbol with " & vbCrlf
& ", so that it was at least spaced correctly.
There is a workaround to this problem at:
http://www.mvps.org/access/bugs/bugs0035.htm which may
help, personally I haven't tried it yet (to be honest I
was concerned if it would work or not in a runtime
environment).
Hope this is of some help.
Regards,
Paul
 
Hi, In Form_Error , Access give me only DataErr. Err.Description return ""
and Err.Number return 0.

Or you have some method to get message ?
 
Back
Top