Results 1 to 4 of 4
  1. #1
    mike760534211 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    12

    getting error 2465 can't find the field '|1' referred to in your expression

    i have a form that is used to list multiple rows(tickets) from a single database via a query. this form is used so that people can list and update multiple records by just clicking through the fields.

    i am trying to use the following to write and update a different field in the database when focus is lost and am getting error getting error 2465 can't find the field '|1' referred to in your expression. the code i am using below works correctly on a different form but not on the multiple row form that is using the query for its data source.



    Code:
    Private Sub Summ_Convo_LostFocus()
    
        On Error GoTo Form_BeforeUpdate_Err
    
        [Date Modified] = Date & " " & Time()
        [Update Counts] = [Update Counts] + 1
        If ([Update Counts] = 1) Then
            [Audit Log Time Stamps] = [Audit Log Time Stamps] & Chr(13) & Chr(10) & Date & " - " & Time() & "- Created"
        Else
            [Audit Log Time Stamps] = [Audit Log Time Stamps] & Chr(13) & Chr(10) & Date & " - " & Time() & "- last modified by - " & [Modified By]
        End If
    
    
    Form_BeforeUpdate_Exit:
        Exit Sub
    
    Form_BeforeUpdate_Err:
        MsgBox Error$
        Resume Form_BeforeUpdate_Exit
    End Sub
    the debug highlights the following when it gives the error:

    Code:
    [Audit Log Time Stamps] = [Audit Log Time Stamps] & Chr(13) &  Chr(10) & Date & " - " & Time() & "- last modified by - "  & [Modified By]
    both of those fields are in the query which comes directly from the database [Record_Store].

    Any help on this would be greatly appreciated.

  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,815
    Is this a form/subform arrangement?

    Why not use Now()?
    [Date Modified] = Now()

    Why put a hyphen between Date and Time?
    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.

  3. #3
    mike760534211 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    12
    Quote Originally Posted by June7 View Post
    Is this a form/subform arrangement?
    no this is just a single form, it has no subforms in it.

    Quote Originally Posted by June7 View Post
    Why not use Now()?
    [Date Modified] = Now()

    Why put a hyphen between Date and Time?
    it was a specific requirement that cannot be changed. your suggestion i have already brought up and it was shut down with force.

  4. #4
    mike760534211 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    12
    im an idiot. i left a field out of my query. i found the issue and its fixed.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-04-2019, 09:02 PM
  2. Replies: 1
    Last Post: 12-01-2012, 12:44 PM
  3. run time error 2465
    By karma in forum Access
    Replies: 3
    Last Post: 08-09-2012, 04:08 AM
  4. Replies: 5
    Last Post: 06-09-2012, 12:37 PM
  5. Run Time Error 2465
    By jo8701 in forum Programming
    Replies: 1
    Last Post: 02-08-2012, 12:01 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