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

Date Picker error message

Status
Not open for further replies.

JBG

Programmer
Oct 22, 2001
99
US
I have an Access 97 database with a tab control form (4 pages). Each page has numerous ActiveX date/time picker calendar controls.

When the program terminates at run time with this click event:

Code:
Private Sub cmdQuit_Click()
    DoCmd.Quit acQuitSaveAll
End Sub


or when I close the form in design view, I get 1-5 errors messages that all state:

"An error occurred in a call to the Windows date and time picker control."

There is no error number, no other words, nothing. Just the generic message.

Strangely enough, when the program is running and I close it by executing the above click_event, I usually get just 1 or 2 of the "An error occurred..." error messages, but when I am designing, and then close the form, I get the full onslaught (up to 5 or so).

Throughout the tab pages, I set the value of all of the date/time pickers with the following generic code:

Code:
Me.DateTimeControl.SetFocus
Me.DateTimeControl.Value = Nz(Me.FieldValue, "")

I have tried to trap for whatever error this message is
associated with. When I trap in the unload event's error handler, I get err.number 0 and no message, then with the 'Resume next' (still in the err handler of the unload event), I get err.number 20 and err.description that says there is no error description (neat). Then I get the "An error occurred..." error message several more times, and the deactivate and close events never fire.

Any help would be most appreciated as this error appears to be untrappable and the db is going into production. I need to supress these error messages.

Sorry for the long post - I'm desperate.

email to: Jeff.B.Goodman@wellsfargo.com

Thanks,
JBG






 
Jeff,
Check if the Db compiles properly. Then have a look at the references to all your OCX libraries: make sure the versions you have on the form match the libraries. I don't recall but the DTPicker OCX might not appreciate a "" for a value: Perhaps try Date or Now or Time instead?...good for a test regardless.
Gord
ghubbell@total.net
 
Thanks for your help, and to the other gentleman who replied. I (re?) registered the mscomctl2.ocx in the System32 folder and all seems well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top