Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 4th, 2006, 06:05 AM
Authorized User
 
Join Date: Mar 2006
Location: London, , United Kingdom.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Method or data member not found

I m new with VB. I m trying to add data from VB interface to Microsoft access. But its showing "Compiler error: Method or data member not found" error.n its highlighted at Private Sub cmdOk_Click()

My code is as follows:

Private Sub cmdOk_Click()
Dim rs As New ADODB.Recordset
mdldb.dbconnect
Dim sql As String
On Error GoTo errorhandler

if anyone could help me with this, i would really appreciate.

sql = "insert into StudentProfile values ('" & txtID.Text & "','" & txtDob.Text & "','" & cmbTitle.Text & "','" & txtFname.Text & "','" & txtMname.Text & "','" & txtLname.Text & "','" & cmbGender.Text & "','" & txtNationality.Text & "','" & txtHouseNo.Text & "','" & txtStreet.Text & "','" & txtCity.Text & "','" & txtPoCo.Text & "')"
valid

If isValid = 1 Then
  mdldb.dbconnect
  mdldb.conn.Execute (sql)
  txtID.Text = txtID.Text + 1
  Reset
End If
Exit Sub
errorhandler:
   MsgBox Err.Description
Reply With Quote
  #2 (permalink)  
Old March 6th, 2006, 03:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

that is odd. I am wondering if there is something "before" that line that is causing the error. Can you post some of the previous the lines? Do you have Option Explicit? How is mdldb declared?

BTW try running with a full compile (Ctrl+F5), you get compile errors right away and usually they are more descriptive

Marco
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
complile error : method or data member not found! Tasha Access VBA 6 May 1st, 2007 03:49 PM
Method or Data Member not Found Related to Crystal ishqvj Beginning VB 6 0 November 29th, 2006 03:49 AM
Method or Data member not found Anup Gavate VB How-To 2 March 25th, 2005 04:50 PM
LoadFrom Invoke Member... Method not found DolphinBay VB.NET 2002/2003 Basics 1 April 29th, 2004 10:01 AM
LoadFrom Invoke Member... Method not found DolphinBay ASP.NET 1.0 and 1.1 Basics 0 April 29th, 2004 09:29 AM



All times are GMT -4. The time now is 09:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.