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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date function not showing date in the form

Status
Not open for further replies.

GPUser05

Technical User
May 31, 2005
32
US
Hi,

I have a starting form that shows today's date when open. It is a textbox which uses Date()function. Same application is running on different machines. On one machine only when I open the application I can't see the date, instead it gives me Name# error. Any help is highly appreciated.

Thanks in advance for your time.
 
That is indicative of a missing library file.

On the machine that you are having trouble with :-
Open the db in design mode and open a code window
From the tools menu select References and look down the list of TICKED references for one that is missing.


The solution might be that you need to get this machine up to date with its MDAC version.

MDAC is a free download from the MicroSoft website.


'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Thanks for your quick reply. I thought of that but I can't check the references as it is asking me for password and the person who has designed the application does not think there was password set for this. It is strange that I can do everything else with code without password. Do you think you can set password just for references in VB? I thought you can lock the project and user cannot view the code.

Thanks a lot.
 

In the code window select tools menu, properties.

Then go the the protection tab.


If you put a password in the lower two boxes but DO NOT put a tick in the top tick box then you are free to see code but you can't get to things like the References dialog or back to the Properties box.

You need to press the developer for the password.


'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Thanks, you are so helpful but develoepr is no more working here and can't remember the password. I did not mention it before but on the same machine I have trouble opening the forms in the same application. It gives me error "can't find project or library". I tried to open another ACCESS application on the same machine and I can see the date and open the froms too. Do you think of any other way I can fix this?
Only thing I know I can do is to create new database, export out all objects and will not have password problem but that would be last resort.
 
No not a last resort - that IS your next logical step.

( And it is only possible because the developer left the code unsecured. )

But do it the other way round.

Open a New db and the INPORT all of the opbjects from the troublesome db into the new Db.

Then try to view the References dialog box.
( I've not tried this with the Protection set up you have - but it would certainly be my next step )


Remember that if your app has any Import/Export specifications ( used with DoCmd.TransferXxx type commands ) then you'll need to copy over the MSysIMEX... tables and you'll need to respecify the database StartUp parameters manually too.

But that's not too much to ask to get the db working again is it ?


'ope-that-'elps.


G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
I haven't had good luck importing from a database where there was protection setup... it still prompts me for the password.

I have often found that when a function Date() or Now() stops working the reference I am missing is for COMCT232.OCX. Either the file is missing or it is corrupt. You can check the one PC that isn't working against a PC that is working to see if this file is there and if it is the same size. I have known COMCT232 to become corrupted, needing replacement.

HTH
 
LittleSmudge,

Thanks a lot for your help. I am going to attempt the import process. I will post how well it went.

rubbernilly,

Thanks for your help.

Do I look for this file in ACCESS runtime folder under Microsoft Office files?
I did import one object in new database to check the references and it did not prompt me for the password. I will see how it goes with all the objects.

Thanks,
 
comct232.ocx would be in your system32 folder under your windows installation.

If it is missing, then on the computer it is missing from you would have to copy it to the system32 directory, and then execute the following line from a Run prompt (or command prompt):

[tt]regsvr32 c:\windows\system32\comct232.ocx[/tt]

Of course, WINNT or Windows 2000 would have "c:\winnt\system32\..." as the directory location.
 
I had started import process on my machine and was also trying different passwords and finally one worked. Thank you for your help. I checked the references and missing one was Acrobat Control for ActiveX. I fixed that and not getting any error. But still I can't see the date. I checked for comct232.ocx and it is the same size as other machine. I will work on it and let you know if it is fixed.

Thanks a bunch for your time.
 
Have you successfully compiled the database ?
When in VBE, menu Debug -> Compile

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV,

Yes I did compiled successfully. I closed the application and started again and I can see the date.

Thanks to all for your time. This is a grate forum. I get answers all the time browsing through it.

This is my second post to this forum. Thanks to LittleSmudge and rubbernilly for their prompt reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top