SEARCH YOUR SOLUTION HERE  

VB Object doesn't support property or method when it should. - Data control problem.

Hi I'm developing aa number of applications to trawl through the files on a computer and perhaps process them in various ways, but I have hit a problem To step through the hard disks I set up drive, directory and ...

Posted On: Sunday 11th of November 2012 10:38:23 PM Total Views:  412
View Complete with Replies




Related Messages:

i want to create project in vb6.0   (261 Views)
hi respected , i m ankit bhatt and i m study in B.C.A, i want to create project in Microsoft visual basic 6.o and my project name is pvc pipe sales management system,and front end tool is microsoft visual basic 6.0 and back end tool is Oracle 9.i but i have no idea then i create the project .... tell me some idea gives i have to create my project plz needed help us
Where should I start with network databases in vb6?   (253 Views)
I'm trying to code a simple application that reads a text file from a my server at work from any computer via network connection. I've searched the internet about networks for vb6 etc about I don't really know what I'm looking for. I was hoping someone could point me in the right direction for facing this task. Thank you.
how design and access in vb   (261 Views)
I'm Jai sankar new member in Talkaboutprogramming website. i'm happy for joining your site. thanks. , how to design crystal report in vb . i'm using back end as ms access and front end as visual basic. i handle more ...
open wordfile from vb works only once.   (212 Views)
Hi all, I use following code to open a wordfile from VB but it works only the first time. Second time I try to open word I get only an empty Word-screen.... Private Sub cmdRetrieveDoc_Click() Dim objWord As Object Dim ...
combobox (dropdownlist ver) issue.......vb6   (258 Views)
Hi all and thanks for reading, my problem comes from finding the right approach to create a runtime scenario where a combobox(2- dropdownlist) choice denotes whether a series of further comboboxes are enabled or not. (NOTE: WHERE "1 OR 2" IS IN THE CODE I HAVE TRIED STATING THE ACTUAL STRINGS AS VALIDATAION TOO, BUT DID NOT WORK EITHER....) my code so far is..... If cboCat.Change = 1 or 2 then cboDept.Enabled = True ' changes from set to enabled = false cboFee.Enabled = True ' changes from set to enabled = false cboPaid.Enabled = True ' changes from set to enabled = false End If Please help people im a newb and dont know very much about vb6, just that its suppoesed to work and i cant get it too Thankf fr reading
How to import csv data into mysql using vb   (250 Views)
, I'm trying to design code that automates importation of microsoft project data into a mysql database using vb. So far I have managed to convert the .mpp files into csv files. Can anyone assist me in how to import the csv files into mysql without using the import option in mysql. I want to automate the import automatically. Here is the code: Sub Export_to_csv() ' Export_to_csv ' Wed 11/05/11 by Moses Oduma. 'Kill "C:\Documents and Settings\oduma\Desktop\KRATasks1.csv" Dim MyFile As String Mypath = "C:\Documents and Settings\oduma\Desktop\project\" MyFile = Dir(Mypath) Dim cnt As Integer cnt = 0 Do While MyFile "" If MyFile Like "*.mpp" Then FileOpenEx Name:=Mypath & MyFile, FormatID:="MSProject.MPP" MapEdit Name:="export_test1", Create:=True, OverwriteExisting:=True, DataCategory:=0, CategoryEnabled:=True, TableName:="Task_Table1", FieldName:="ID", ExternalFieldName:="ID", ExportFilter:=" Tasks", ImportMethod:=0, HeaderRow:=True, AssignmentData:=True, TextDelimiter:=";", TextFileOrigin:=0, UseHtmlTemplate:=False, IncludeImage:=False MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Name", ExternalFieldName:="Name" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Duration", ExternalFieldName:="Duration" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Start", ExternalFieldName:="Start_Date" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Finish", ExternalFieldName:="Finish_Date" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Work", ExternalFieldName:="Scheduled_Work" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Cost", ExternalFieldName:="Cost" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Actual Start", ExternalFieldName:="Actual_Start" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="Actual Finish", ExternalFieldName:="Actual_Finish" MapEdit Name:="export_test1", DataCategory:=0, FieldName:="% Work Complete", ExternalFieldName:="Percent_Work_Complete" FileSaveAs Name:="C:\Documents and Settings\oduma\Desktop\KRATasksss" & cnt & ".csv", FormatID:="MSProject.CSV", map:="export_test1" cnt = cnt + 1 End If MyFile = Dir Loop End Sub
vbscript copy lines from text doc with certain words to new text doc   (372 Views)
I'm working on a VBscript that will search through a text document for certain words. If it finds a word it should copy the line into a new text document. I get an error on line 25 of type mismatch, but I'm not sure how to resolve it. Here is the code: ' Writing Data to a Text File Const ForReading = 1 Dim words(13) words(0) = "ms sql" words(1) = "mysql" words(2) = "virus" words(3) = "spoof" words(4) = "VNC" words(5) = "terminal" words(6) = "imesh" words(7) = "squid" words(8) = "ssh" words(9) = "tivo" words(10) = "udp idk" words(11) = "web access request dropped" words(12) = "bounce" Set objFSO = CreateObject("Scripting.FileSystemObject") Set inFile = objFSO.OpenTextFile("c:\Documents and Settings\user\Desktop\input.txt", ForReading) Set outFile = objFSO.OpenTextFile("c:\Documents and Settings\user\Desktop\output.txt", 2, True) i = 0 Do Until inFile.AtEndOfStream strSearchString = inFile.ReadLine Set colMatches = words(i)(strSearchString) If colMatches.Count > 0 Then For Each strMatch in colMatches outFile.WriteLine line Next End If i = i+1 Loop objFile.Close
how to copy and paste a file in win 7 using vb6   (209 Views)
hi, i want to copy a file from "d:\" to "c:\Program Files"... i have done a code but i have an error that says "Access Denied"... Private Sub Form_Load() Dim FSO As New FileSystemObject Dim dpath, SPath As String Dim FOName dpath = "C:\Program Files\Common Files\" SPath = "D:\Data.mdf" FSO.CopyFile SPath, dpath End Sub
screen scaping using vb on ibm terminal   (286 Views)
hi, I want to connect to a IBM RISC 6000 F-50 using ssh protocol and private key authentication, and I want to retrieve some data or update data based on user interaction. Currently I am using a 3151 terminal emulator ...
vb   (230 Views)
what do u mean by vb
I would like to know the advantages of calculator done vb6   (285 Views)
Can U just tell me the Advantages of calculator done in VB 6
vb6 log in form   (266 Views)
hi i need help asap, i'm supposed to make a log in form that will connect to an access database using the adodc Private Sub Command1_Click() Adodc1.RecordSource = "Select * from tblmain Whereuser = '" & Text1.text & "' AND pass = '" & Text2.text & "'" If Adodc1.Recodset.RecordCount = 1 Then MsgBox "A" End If EndSub i have two textboxes for username and password, 1 log in button and 1 adodc in the database i have 3 columns, and id, user and pass
find and copy whole line has string vb6   (272 Views)
hi, I have richtextbox. how I can search for string in every line and copy the lines contain that string. for example: I have some text in richtextbox Like this: " cheapest in the business, we also offer you tremendous value for your money. Given below is the list of social bookmarking sites that we submit to. This list is regularly updated. At present, there are 1349 sites on this list. http://www.someweb.com http://www.someweb.com http://www.someweb.com http://www.someweb.com http://www.someweb.com how I can copy whole lines that have "www"
vb6 log in form   (279 Views)
hi i need help asap, i'm supposed to make a log in form that will connect to an access database using the adodc Private Sub Command1_Click() Adodc1.RecordSource = "Select * from tblmain Whereuser = '" & Text1.text & "' AND pass = '" & Text2.text & "'" If Adodc1.Recodset.RecordCount = 1 Then MsgBox "A" End If EndSub i have two textboxes for username and password, 1 log in button and 1 adodc in the database i have 3 columns, and id, user and pass
export data to excel vb6 group by with total.   (370 Views)
i need compute for the total amount in excel in a group by clause but i dont know how to generate the total of items which are group by area: need help in this code: thanks On Error Resume Next Dim lc, NxtLine, k If Trim(LstCode.Text) "" Then Screen.MousePointer = vbHourglass Connect Set ExlObj = CreateObject("excel.application") ' Initialize the excel object ExlObj.Workbooks.Add ' Add an excel workbook ' Get the required data from the database rsGetData.Open "select distinct AREA,company_code,branch_code,daily_sales,month_to_date,ave_dailysales,previous_year,variance,percentage,mtd_projection,mtd_variance,mtd_percent,current_ytd,previous_ytd,ytd_variance,ytd_percent,ytd_projection,projection_variance,current_ytd_variance from " & _ "dailysales where region = '" + Trim(List1.Text) + "' order by area", con, adOpenDynamic, adLockOptimistic ' rsGetData.Open "select area,SUM(CAST(daily_sales as float))from dailysales group by area", con, adOpenDynamic, adLockOptimistic If Not rsGetData.EOF Then ExlObj.Visible = True ' Show the excel sheet With ExlObj.ActiveSheet ' Print the heading and columns first .Cells(1, 1).Value = "WORLD OF FUN" .Cells(1, 1).Font.Bold = True: .Cells(2, 1).Value = "DAILY SALES REPORT" .Cells(2, 1).Font.Bold = True: 'ADD DATE HERE .Cells(1, 3).Font.Name = "Verdana" '.Cells(1, 3).Font.Bold = True: .Cells(3, 4).Value = "Day Sales" .Cells(3, 4).Font.Bold = True: .Cells(3, 5).Value = "Month To Date Sales": .Cells(3, 5).Font.Bold = True: .Cells(3, 6).Value = "Ave.Daily Sales to Date" .Cells(3, 6).Font.Bold = True: .Cells(3, 7).Value = "Prev. Month Sales to Date" .Cells(3, 7).Font.Bold = True: .Cells(3, 8).Value = "Variance" .Cells(3, 8).Font.Bold = True: .Cells(3, 9).Value = "%" .Cells(3, 9).Font.Bold = True: .Cells(3, 10).Value = "MTD Sales" .Cells(3, 10).Font.Bold = True: .Cells(4, 10).Value = "Projection" .Cells(4, 10).Font.Bold = True: .Cells(3, 11).Value = "Variance" .Cells(3, 11).Font.Bold = True: .Cells(3, 12).Value = "%" .Cells(3, 12).Font.Bold = True: .Cells(3, 13).Value = "Current Year" .Cells(3, 13).Font.Bold = True: .Cells(4, 13).Value = "to Date Sales" .Cells(4, 13).Font.Bold = True: '.Cells(4, 13).Font.Bold = True: ' .Cells(3, 13).Font.Bold = True: .Cells(3, 14).Value = "Previous Year" .Cells(3, 14).Font.Bold = True: .Cells(4, 14).Value = "to Date Sales" .Cells(4, 14).Font.Bold = True: ' .Cells(4, 15).Font.Bold = True: .Cells(3, 15).Value = "Variance" .Cells(3, 15).Font.Bold = True: .Cells(3, 16).Value = "%" .Cells(3, 16).Font.Bold = True: .Cells(3, 17).Value = "YTD Sales" .Cells(3, 17).Font.Bold = True .Cells(4, 17).Value = "Projection" .Cells(4, 17).Font.Bold = True: .Cells(3, 18).Value = "Variance" .Cells(3, 18).Font.Bold = True: .Cells(3, 19).Value = "%" .Cells(3, 19).Font.Bold = True: ExlObj.Columns("A:Y").ColumnWidth = 12 End With End If For k = 1 To rsGetData.Fields.Count ' Column headings are set to bold and white. ' ExlObj.ActiveSheet.Cells(4, k).Font.Bold = True Next Set k = Nothing NxtLine = 5 ' Now we will export data into the sheet Do Until rsGetData.EOF For lc = 0 To rsGetData.Fields.Count - 1 ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = rsGetData.Fields(lc) If rsGetData.Fields.Item(lc).Name "DATE" Then ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = rsGetData.Fields(lc) Else ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = Format(rsGetData.Fields(lc), "dd/mm/yy") End If Next rsGetData.MoveNext NxtLine = NxtLine + 1 Loop ' Once the data has been exported, we will format the sheet _ Screen.MousePointer = vbDefault Else MsgBox "Please select a code" & Chr(13) & "and then proceed", vbInformation Screen.MousePointer = vbDefault Exit Sub End If This post has been edited by macosxnerd101: 25 November 2010 - 09:38 AM Reason for edit:: Please use code tags
excel vb size   (174 Views)
i have an excel spreadsheet with embedded vb . it's amazingly huge (600k to 900k). as i put in minor edits to the code or forms, it gets bigger very fast. for example, i added 2 buttons and about 5 ...
vb Drawing Program   (230 Views)
the user must be abil to draw in the picturebox and insert symbols on the drawing can u plze help me. here is my code Public Class Form1 Dim xStart, yStart, xEnd, yEnd As Integer Dim Drawbitmap As Bitmap Dim Drawgraphics As Graphics Dim myPen As New Pen(Color.Black, 3) Dim myColor As Color = Color.Blue Dim myBrush As New Drawing.SolidBrush(Color.Black) Dim myBrushWidth As Integer Dim ContinuousFlag As Boolean Dim smootherLocation As New Point(0, 0) Private Sub drawMyline() PictureBox1.Image = Drawbitmap Drawgraphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality Drawgraphics.DrawLine(myPen, xStart, yStart, xEnd, yEnd) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Drawbitmap = New Bitmap(PictureBox1.Width, PictureBox1.Height) Drawgraphics = Graphics.FromImage(Drawbitmap) PictureBox1.Image = Drawbitmap myBrushWidth = 4 End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click End Sub Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown xStart = Control.MousePosition.X - (Me.Left + PictureBox1.Left + 8) yStart = Control.MousePosition.Y - (Me.Top + PictureBox1.Top + 29) If RadioButton1.Checked = True Then ContinuousFlag = True End If End Sub Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove If ContinuousFlag Then Drawgraphics.SmoothingMode = Drawing2D.SmoothingMode.None If Not smootherLocation = New Point(0, 0) Then Drawgraphics.DrawLine(myPen, smootherLocation.X, smootherLocation.Y, e.X, e.Y) End If smootherLocation = New Point(e.X, e.Y) PictureBox1.Image = Drawbitmap End If End Sub Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp xEnd = Control.MousePosition.X - (Me.Left + PictureBox1.Left + 8) yEnd = Control.MousePosition.Y - (Me.Top + PictureBox1.Top + 29) smootherLocation = New Point(0, 0) If RadioButton1.Checked Then ContinuousFlag = False Else drawMyline() End If End Sub Private Sub ytveer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ytveer.Click myColor = Color.White myPen = New Pen(myColor, 7) Drawbitmap = Form2.Reset.Image PictureBox1.Image = Drawbitmap End Sub Private Sub btnBlack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBlack.Click myColor = Color.Black myPen = New Pen(myColor, 4) End Sub Private Sub Red_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Red.Click myColor = Color.Red myPen = New Pen(myColor, 7) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Butto.Click Form2.TextBox1.Text = Me.TextBox1.Text Form2.TextBox2.Text = Me.TextBox2.Text Form2.TextBox3.Text = Me.TextBox3.Text Form2.Reset.Image = Drawbitmap PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable) End Sub Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim MyImage As Bitmap If fd1.ShowDialog() = DialogResult.OK Then MyImage = New Bitmap(fd1.OpenFile()) 'PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage 'PictureBox1.Image = CType(MyImage, Image) End If End Sub End Class This post has been edited by macosxnerd101: 14 November 2010 - 01:22 PM Reason for edit:: Added code tags and moved to VB.NET
access 2007 search code in vb 2008   (192 Views)
iam creating a vb project on a hotel management system and using access 2007 database. i have tried to put a search code but it cant search or do any thing it is telling me that the specified path is not the correct one i have verified it but it still has a problem the search code is as follows Imports System.Data.OleDb Public Class frmMembersSearch Private Sub MembersSearch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=D:\Mark.accdb") Dim cmd As OleDbCommand = New OleDbCommand("SELECT Member_ID, Name,ID_No, Account_Type, Loan_ID, Joining_Date FROM Member", con) con.Open() Dim ds As New DataSet() Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd) ds = New DataSet() myDA.Fill(ds, "MyTable") 'Fill DataSet object with data con.Close() DataGridView1.DataSource = ds.Tables("MyTable").DefaultView End Sub 'Then filter datatable view Private Sub txtMemberName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMemberName.TextChanged Dim searchName As String = txtMemberName.Text Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=D:\Mark.accdb") ' Use wildcard' Dim cmd As OleDbCommand = New OleDbCommand("SELECT Member_ID, Name,ID_No, Account_Type, Loan_ID, Joining_Date FROM Member WHERE Name Like '%" & SearchName & "%' ", con) ' or Where JobNo='" & SearchJob & "' con.Open() Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd) Dim myDataSet As DataSet = New DataSet() myDA.Fill(myDataSet, "MyTable") DataGridView1.DataSource = myDataSet.Tables("MyTable").DefaultView 'Dim SearchName As String = txtMemberName.Text Dim ds As New DataSet() ds.Tables("MyTable").DefaultView.RowFilter = "Name =" & SearchName ' or = "Name Like '%" & SearchName & "%' " End Sub End Class please assist me MOD EDIT: When posting code...USE CODE TAGS!!! Also, VB 2008 is NOT VB6, it's VB.NET. Moved there. This post has been edited by JackOfTrades: 04 November 2010 - 05:56 AM
access and vb   (152 Views)
Hi I have two forms and one database(access) The first form accepts a username and password, the second asks lots of math questions and the database contains all info relating to users. I do not want to display any info ...
how to ftp in vb 6?   (298 Views)
In one of my projects, I need to transfer a text file from local machine to an ftp server. As I haven't tried this before I would like to know how to go about this. I searched this forum and found the following post:- http://www.dreaminco...om-ftp-in-vb60/ However, I dont have Inet control in components window so haven't tried this yet. Can someone tell how to add Inet control to components or suggest another alternative