+ Reply to Thread
Results 1 to 3 of 3

Run-time error 3265, but fields do exist!

  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Canada
    MS-Off Ver
    Office 2013
    Posts
    120

    Question Run-time error 3265, but fields do exist!

    Ok, I have been at this one for quite a while, and I have to admit that I am new with VBA recordset code...

    Here is my code:
    Please Login or Register  to view this content.
    The table in question has these fields:
    AssetName
    Categories
    Keywords
    FilePath

    This is copy pasted straight from the table (as I also did with the code). At first I was just adding the AssetName and the Keywords. In this code, that is all that will be added in any case. AssetName has no issue, but it gave the error on Keywords. So I thought that maybe it needs to do the fields in order. So I threw in Categories, but it would give the error on that too. AssetName is the Primary Key... Why are the other fields not recognized as fields in the set?

    Eventually, I want to put the value of a control on the page into the Keywords field. I initially had it as such:

    !Keywords = me.KeywordPass.value
    Last edited by jik_ff; 01-13-2014 at 05:07 PM. Reason: Resolved

  2. #2
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Canada
    MS-Off Ver
    Office 2013
    Posts
    120

    Re: Run-time error 3265, but fields do exist!

    Face Palm of the day...

    Ok, I guess my problem is that I am not getting all the fields with by strSQL statement. I am only getting the AssetName field.... Like I said, I am new with the recordset stuff.... The fix for me was to change my SQL string to:

    strSQL = "SELECT [AssetName],[Keywords] FROM [ForProcessing] WHERE [AssetName] = '" & Me.AddAsset & "'"


    Go ahead and laugh... I did...

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Run-time error 3265, but fields do exist!

    I find that a sure way to make sure that your SQL statement in VBA works (when I am having difficulties) is to create it in the QBE and when it returns the expected results, copy the SQL statement into VBA and then delete the query from the QBE. Sounds convoluted, but it does help. Glad you figured it out on your own. Learning is No laughing matter, but it is always good to have a chuckle on oneself.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] My Attempt in using an Array but getting an error (3265)
    By efisher in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-13-2014, 03:31 PM
  2. [SOLVED] Run Time Error 3265 - Item not found in this collection
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2013, 07:19 AM
  3. To find if error exist in a set of travel time values
    By pksreela in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-05-2012, 03:15 AM
  4. run time error 1004 when using macro to change pivot Table fields.
    By Craigs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2011, 06:19 AM
  5. runtime error 3265 error in a VBA Query to pull info from ERP Database
    By NBVC in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-12-2010, 03:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1