Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2015
    Posts
    17

    Run Time error 3464

    Hello everyone on my database I have a form named frmGoToRecordDialog when I
    select a customer and click show record it should open frmCustomers on that
    record of the customer selected but instead I get run time error 3464 data type
    mismatch in criteria expression. Can anyone please help me? thank you 242CCA_A05.zip

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Was this not helpful? That error usually means you've used the wrong syntax for the data type.

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jan 2015
    Posts
    17
    Hi pbaldy
    I read your article and check my code but my sintax seems correct to me here is the code I'm a newbie so I might be missing something that you might be able to catch
    Code:
    Private Sub cmdShowRecord_Click()
    DoCmd.OpenForm "frmCustomers", acNormal
    'declare recordset to hold customer records
    Dim rstCust As DAO.Recordset
    'load recordset
    Set rstCust = Forms!frmCustomers.RecordsetClone
    'match EmpID with FindEmp ID
    rstCust.FindFirst "fldCustomerID = '" & lstFindCus & "'"
    'go to the record
    Forms!frmCustomers.Bookmark = rstCust.Bookmark
    'close the dialog
    DoCmd.Close acForm, "frmGoToRecordDialog"
      
    End Sub
    Thank you

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    What is the data type of the field? If it's numeric try:

    rstCust.FindFirst "fldCustomerID = " & lstFindCus
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Join Date
    Jan 2015
    Posts
    17
    I didn't know the quotes had something to do with the numeric type! I was very confused because I thought it only applied to text and date.. Thank you

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Auto Populate SQL with Run-Time Error 3464
    By excellenthelp in forum Programming
    Replies: 4
    Last Post: 08-04-2014, 12:03 PM
  2. Execution error 3464
    By Trisha in forum Access
    Replies: 3
    Last Post: 03-03-2014, 01:03 PM
  3. Replies: 15
    Last Post: 12-04-2012, 01:39 PM
  4. Run-time error '3464' Date criteria
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 12-30-2011, 12:34 PM
  5. 3464 error received
    By TEN in forum Programming
    Replies: 10
    Last Post: 07-08-2009, 07:25 PM

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