Time () on the form

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

I'm using Access 2002 and use Time() on the form but it won't give me
anything. I try Access 97 but it's work. I don't want anything to create
on table and query. I just want the form.

[StartTime] = Time()

Is there a reason for Time() that won't work on Access 2002?

Thanks,
 
What do you mean by "won't work"? Are you saying you get an error?

There are two likely causes for that:

1) You've got an object in your application named Time (A field in a table,
a variable in VBA code, a routine in a module, etc) (Time is a reserved
word, and should never be used for your own purposes.

2) Your References collection is messed up.

For the former, rename the offending object.

For the latter, open any code module, then select Tools | References from
the menu bar. Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

As a quick fix, you should be able to use VBA.Time instead of just Time, but
you really should correct the underlying problem!
 
Back
Top