|
-
Feb 8th, 2006, 09:29 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Error in Access Form
I have a tiny little Access form with the following code
VB Code:
Private Sub Form_Load()
Label41.Visible = False
ctlDate.Value = Date - 1
strDateName = "AdmitDate"
strDownloadType = "All"
End Sub
When opening this form I get the following error message:
There is no object in this control
It then highlights the "ctlDate.Value = Date -1" line.
What...the...hell?
I do have a control on the form named ctlDate so I am lost here.
-
Feb 8th, 2006, 09:35 AM
#2
Re: Error in Access Form
What type of control is cltDate? I ask because your code looks fine.
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Feb 8th, 2006, 09:42 AM
#3
Thread Starter
Fanatic Member
Re: Error in Access Form
I've programmed in VB forever but this Access thing (forms, controls) is kinda foreign to me. How can I tell because it's not my code.
It looks exactly like a textbox but I think it's a DTPicker. Here's some info from Access.
Name .....ctlDate
OLE Class.....DTPicker
Class.....MSComCtl2.DTPicker.2
Last edited by The_Grudge; Feb 8th, 2006 at 09:47 AM.
-
Feb 8th, 2006, 09:55 AM
#4
Re: Error in Access Form
OK so it is a DTPicker.
Can yuo check in your VBA Tools-->References to see if you have a reference to "Microsoft Windows Common Controls-x.x"?
Also, what version of Access are you using? (I'm hoping its not 97....)
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Feb 8th, 2006, 10:00 AM
#5
Thread Starter
Fanatic Member
Re: Error in Access Form
I'm using Access 2000.
Microsoft Windows Common Controls - 2 6.0 (SP6)
Microsoft Windows Common Controls - 6.0 (SP6)
I think I may know the issue. The database/VBA code was developed on a PC that I know for a fact does not have SP6. They are still running VB sans any service packs.
Also, if I go into Access and click on the "more controls" icon in the toolbox and select "Microsoft Date & Time Picker Control SP6" I get the following error when I try to add a new DTPicker to the form:
The OLE server isn't registered. To register the OLE server, reinstall it.
-
Feb 8th, 2006, 10:07 AM
#6
Re: Error in Access Form
Yea, that a problem. You are going to have to do an OLE server register reinstall.
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Feb 8th, 2006, 10:24 AM
#7
Thread Starter
Fanatic Member
Re: Error in Access Form
Pardon my french but how the hell do I do that?
Oh, and what else is sweet.....in all of the MDAC updates/installs in the last few days to get this Database working my VB app that worked perfectly last week is all dicked up now.
This will be a fun day.
-
Feb 8th, 2006, 10:44 AM
#8
Re: Error in Access Form
Have a look at the following KB artice on using Regsvr32 to register OLE controls.
http://support.microsoft.com/kb/q249873/
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Feb 8th, 2006, 10:59 AM
#9
Thread Starter
Fanatic Member
Re: Error in Access Form
Go figure, but when I fixed the broken references/components in my VB program it fixed this issue too.
Who the hell knows why....dah well, it's working I guess.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|