Results 1 to 3 of 3
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191

    recordset Runtime Error 3075


    Hi guy's, can anyone put me right on this one please ? probably can't see the wood for the trees!!

    Code:
    Dim MyZero As Long, MySort As Long, MySort2 As Long
    
    
    
    If Me.cboOptionsIndex6 = "Check Zero Qty" Then
    MyZero = "0"
    MySort = "1"
    MySort2 = "10"
    Set rs = CurrentDb.OpenRecordset("Select * From tblStock WHERE StartQty = " & MyZero & " And SortNo Between " & MySort & " And " & MySort2 & " & Order By SortNo;")

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,421
    always helps to provide the error description, most people don't remember what they are for the 10k+ possible errors and may not want to spend time looking it up. Plus some error codes can have different descriptions depending on context.

    May or may not be the problem but since your variables are dimmed as longs, you don't assign them string values - drop the double quotes. MyZero = "0" should be MyZero = 0

    Beyond that, depends on the error description to tell you what to look at. Not prepared to speculate or spend time looking it up

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Don't use strings where you want numbers.

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

Similar Threads

  1. Runtime error 3075
    By Thompyt in forum Programming
    Replies: 2
    Last Post: 11-21-2017, 04:43 PM
  2. RunTime Error 3075 in my query
    By burrina in forum Queries
    Replies: 10
    Last Post: 01-07-2013, 08:23 PM
  3. runtime error 3075
    By Compufreak in forum Access
    Replies: 3
    Last Post: 08-14-2012, 01:40 AM
  4. RunTime error 3075
    By Compufreak in forum Access
    Replies: 3
    Last Post: 07-25-2012, 02:18 AM
  5. Runtime 3075 error
    By whm1 in forum Programming
    Replies: 4
    Last Post: 03-24-2010, 02:50 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