Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox Shows #Name? - This is not right.

Status
Not open for further replies.

joatmofn

Technical User
Jan 12, 2003
72
US
I am suddenly getting strange problems on our live system.

Several forms with unbound textboxes set the Default Value to =date(). These forms in particular are now showing #Name? in the textbox.

To try and determine the cause of the problem, I created a new textbox and set default value to =date(). Upon pressing enter, I get the following message:

"The function you entered can't be used in this expression."

Up to now, this was not a problem. I went back to our development system and it works just fine.

I compiled the code without a problem. I also compared the references and they are matched.

Any ideas? Thanks a bunch.

 
And no MISSING reference ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Right, the checked references in the development system are the same as the checked references in the live system.
 
How are ya joatmofn . . . . .

Try removing th equal sign (=).

Calvin.gif
See Ya! . . . . . .
 
I fixed it by selecting an unused reference then closing the dialog box, then opening the references dialog box and unchecking the newly checked reference. Go figure.

Thanks just the same to those who replied.
 
I put code in a module in all of my db front-ends which do that automatically on launch, so I don't have to worry about it any more. In my never-ending lameness, I'm not really sure what it means...I copied it from some place else a long time ago:

Code:
Function FixUpRefs()
Dim r As Reference, r1 As Reference
           Dim s As String

           ' Look for the first reference in the database other
           ' than Access and Visual Basic for Applications.
           For Each r In Application.References
              If r.Name <> "Access" And r.Name <> "VBA" Then
                 Set r1 = r
                 Exit For
              End If
           Next
           s = r1.FullPath

           ' Remove the Reference and add it back.
           References.Remove r1
           References.AddFromFile s

           ' Call a hidden SysCmd to automatically compile/save all modules.
           Call SysCmd(504, 16483)
End Function




Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hmmm! I'll give it a whirl. Thanks a bunch.
 
How are ya GingerR . . . . .

Nice work around for the problem! . . . . But for all my experience . . . . [purple]References work or they don't[/purple] . . . [purple]References register properly with the database or they don't![/purple]

[blue]I'd have to find out what the problem is.[/blue] I couldn't sleep after sweeping this one under the rug [yawn]

Calvin.gif
See Ya! . . . . . .
 
Hi AceMan - Yeah you caught me [blush]. I don't really totally understand References, except to know what I have to do to make them work and not be embarrassed most of the time. I used to (wrongly) assume that every all of my users' machines in my part of the company were set up exactly the same as mine(SMS pushes, forced updates, limited admin priviledges to install new software), but even with all of that, of course they aren't. Long ago I discovered this issue with the 'unchecked' references, found this code and used it ever since, so that helps. Of course I've run into other problems that I have to manually fiddle with and fix when they pop up, like a machine that doesn't have a version of a .dll that the rest of us have. But I guess these other instances havn't been painful enough for me to write something that pops up a nice message to the user and send me an email of the exact problem. They get some non-user-friendly message and contact me and I'm glad they're located in my part of the company instead of 30 miles away in our other location.

Do you have other suggestions? Do you use any startup code in all your db's that takes care of all these things?

Have a good one!

g



Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
GingerR . . . . .

It was not my intent to . . . [blue]catch you![/blue] . . . and I still believe its an excellent work around!

According to [blue]joatmofn[/blue] it [blue]worked fine[/blue], then [blue]sometime later[/blue] came up with the error.
TheAceMan said:
[blue]If setting and removing an Unrelated Reference Library fixes a problem, then I would certainly say we have [purple]an indicator of corruption[/purple].[/blue]
It could be some time before this is actually tracked down . . .


Calvin.gif
See Ya! . . . . . .
 
I doubt this particular problem/solution of adding and then removing an unrelated reference will ever be corrected by MS. I suppose its a lot like a reboot that simply resets the references.

I think how things get out of wack is really at the core of the problem. And it probably has something to do windows and office updates. MDAC is is such an example that's nailed me in the past.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top