I use the fOSUserName code on my old database , but I get error at ( String$ ) for this line > strUserName = String$(254, 0) for my 2010 access version .
I use the fOSUserName code on my old database , but I get error at ( String$ ) for this line > strUserName = String$(254, 0) for my 2010 access version .
first thing I would do is make sure that your references are not missing.
open a module and select tools/references..
if any references are missing either remove them from the list or find the correct ones.
if that is not the problem..
strUserName = Null or
strUserName = ""
NAME
string$ - return a string of specified characters
SYNOPSIS
v$ = string$(NumExpr1, NumExpr2)
v$ = string$(NumExpr, StrExpr)
DESCRIPTION
In the first case, string$ returns a string of NumExpr1 occurrences of the character whose ASCII code is NumExpr2. NumExpr1 may be any numeric expression with a non-negative value. NumExpr2 may be any numeric expressions whose values are in the range 0 to 255.
DEC OCT HEX BIN Symbol HTML Number HTML Name Description 0 000 00 00000000 NUL Null char