473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Object doesn't support this property or method

When i run my program and try to open a form I get this error ( Object doesn't support this property or method). I have tried all i can to locate where but it doesnt show me where but these are the codes that are used when it opens that particular form.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. Vform = 1
  3. Me.Height = 7800
  4. Me.Width = 11565
  5. OpenDB
  6. BindControls
  7. MDIVehicleTracker.MnuClose.Enabled = True
  8. MDIVehicleTracker.MnuSave.Enabled = True
  9. MDIVehicleTracker.MnuDelete.Enabled = True
  10. MDIVehicleTracker.MnuExSheet.Enabled = True
  11. MDIVehicleTracker.MnuWrdSheet.Enabled = True
  12. Set NewWs = DBEngine.CreateWorkspace("dbtemp", "admin", "")
  13. Set NewDb = NewWs.OpenDatabase(App.Path & "\VEHICLE_TRACKER.mdb")
  14. End Sub
  15.  
  16. Private Sub OpenDB()
  17.     DVehType.DatabaseName = App.Path & "\VEHICLE_TRACKER.mdb"
  18.     DVehType.RecordSource = "VEH_TYPE"
  19.     DVehType.Refresh
  20. End Sub
  21.  
  22. Private Sub BindControls()
  23. On Error GoTo ErrorHandler
  24.     DBCVehType.ListField = "VEHICLE_TYPE"
  25.     DVehType.Visible = False
  26. ErrorHandler:
  27.     If Err.Number = 3021 Then
  28.         MsgBox "There is no available record in the database", vbInformation
  29.     End If
  30. End Sub
  31.  
and these are the declarations of the variables
Expand|Select|Wrap|Line Numbers
  1. Public NewDb As Database
  2. Public NewWs As Workspace
  3. Public VehType As String
  4. Public Vform As Integer
  5.  
Nov 15 '06 #1
2 1965
willakawill
1,646 1GB
When i run my program and try to open a form I get this error ( Object doesn't support this property or method). I have tried all i can to locate where but it doesnt show me where but these are the codes that are used when it opens that particular form.


[/code]
Hi. If you click on the left margin at the start of your code in the vb editor window the program will stop at that point when you run it and you can step through the lines of code one at a time using F8
This will show you where the problem is.

Good luck
Nov 15 '06 #2
Hi. If you click on the left margin at the start of your code in the vb editor window the program will stop at that point when you run it and you can step through the lines of code one at a time using F8
This will show you where the problem is.

Good luck
I already did that and it still gave me no clue but thanks. I decided to start eliminating some lines by making them comment and running it and later on discovred that it was a variable giving the problem. Thanks for your help.
Nov 16 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Matt | last post by:
I tried to display all html control types in the form. But it has run time error "object doesn't support this property or method" on document.write(obj.type); Even I do document.write('hello...
2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
3
by: news.onetel.net.uk | last post by:
I and my friend Karl have spent literally all day trying to find out what is causing my error but we are zapped of any further functionality :) I have a form that adds news records. You select...
54
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " +...
0
by: fniles | last post by:
I created a CAB file for a 3rd party control (StockChartX) it using CABARC.exe that comes from Microsoft SDK. In the CAB file I included the StockChartX.ocx and StockChartX.INF. Then, I signed the...
7
by: stellstarin | last post by:
hi all, I have a HTML page with two forms. While trying to add a hidden element in a first form by the default javascript function, the error message 'object does not support this property or...
5
by: John Olbert | last post by:
Subject: Error is Object doesn't support this property or method I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX Control. I get the following runtime error-- "Object...
8
by: Kevin Blount | last post by:
I'm tyring to access an object created by using a method from a third party API. The documentation tells me what object should be return, and the properties of that object, but when I try and...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
9
by: Peter Webb | last post by:
I want to animate one object moving in front of another. I cannot re-render the background as the object moves, as it would be extremely time consuming. This is what I would like to do. I draw...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.