Working on a simple application, one database, one form. Security set up for all four Groups. Suddenly, I noticed that my KEY field (Record) was not incrementing. (It may have been happening for a while).
Here is the formula:
Quote:Record = @ToNumber(@XLR(@FN,999999,"frmContacts!Record","Record")) + 1
It has been used for years in Q&A and shown on this forum multiple times.
I spent HOURS trying to find out why XLR was not working to increment number in Record:
I removed IF statements so it would execute all the time.
Syntax was correct.
"Formname!element was included".
Quotes were added and removed to second element around "999999".
@TN was in place to convert from a string.
Swapped destination field from number to text and back again.
Added MSGBOXes to check results.
Confirmed I was getting @ERROR with the XLR. (Someday I will force myself to
ALWAYS include a check for @ERROR after every XLU type of command).
I finally discovered the following situation: Security seems to play a role.
If I use the Security Manager and add a valid user name and password for the XLU functions, then the XLR started working again.
OK, since XLR is a member of the XLU family, maybe it is needed here even though it is looking at itself. But now, even stranger, if I remove the XLU name and password, then the XLR function is still working.
So to make XLR work with Security it seems to be necessary to add a user for XLU, even if you remove it afterwords.
Using Version 1.0.5 Beta. I have no idea why this is happening, but I was able to do this on two different applications.