Very Perculiar Form Behaviour

  • Thread starter Thread starter Andy Roberts
  • Start date Start date
A

Andy Roberts

I have a split database which I have put together locally (i.e. both front
and back end reside in the same directory on the same PC).

Now I've finished it I want to transfer the front and back ends to another
PC. How to do this is simple enough but something strange seems to happen.

I have a main form which opens when the front end is activated and within
the form header are two unbound Txt fields - one to display the current date
(called TheDate) and one the current time (called TheTime). They are both
set to "activate" on the OnTimer event of the form with a Timer interval of
60000.

The code behind the event is:-

Private Sub Form_Timer()
Me.TheTime = Now()
Me.TheDate = Date
End Sub

This works fine on my laptop, but when I copy the front and back end files
to another PC the time works fine but TheDate displays #Name???? I havent
changed anything except relinking the front end to the back end using the
Linked Table Manager.

I don't understand the problem?

Can anyone shed any light on this.

Andy
 
You may have a missing reference, which is detected when the call to Now()
is made, and thus the error.

Note that Now() have also the date in addition to the time.


Vanderghast, Access MVP
 
This works fine on my laptop, but when I copy the front and back end files
to another PC the time works fine but TheDate displays #Name???? I havent
changed anything except relinking the front end to the back end using the
Linked Table Manager.

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top