Results 1 to 2 of 2
  1. #1
    todmac is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    20

    Insert statement wont work

    Hello,
    Can anyone tell me what is wrong with this simple code?
    it keeps coming back "Method or data member not found" and highlights me.datedone, I dont understand.



    Code:
     Private Sub Submit_Click()
    Dim strsql As String
    strsql = "Insert into MAIN (unitnumber, DateDone,kilometers, Item, WheelPosition, measurement) Values ('" & Me.Unit & "','" & Me.DateDone & "', '" & Me.kilometers & "','" & Me.item & "','" & Me.Wheelposition & "', '" & Me.measurement & "')"
    Debug.Print strsql
    Dim db As dao.Database
    CurrentDb.Execute (strsql)
    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,896
    Is this actually solved? Want to share the solution?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. INSERT statement
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 03-29-2013, 12:53 PM
  2. Insert Into statement
    By TimMoffy in forum Programming
    Replies: 7
    Last Post: 07-13-2012, 07:10 AM
  3. DoCmd.MoveSize wont work
    By gbmarlysis in forum Programming
    Replies: 3
    Last Post: 03-02-2012, 06:24 PM
  4. Access wont insert the record
    By chaitanyakvs in forum Queries
    Replies: 1
    Last Post: 03-01-2011, 10:25 AM
  5. Query and subquery wont work with combo box
    By jbg8931 in forum Queries
    Replies: 0
    Last Post: 05-09-2010, 10:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums