Error 2465 Access
Contents |
Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rating: Display Modes 02-16-2009, 08:48 AM #1 Will123 Registered User Join Date: Feb
Error 2465 Access Vba
2009 Posts: 5 Thanks: 0 Thanked 0 Times in 0 Posts Help with Runtime Error 2465 Hi, runtime error 2465 can't find the field i've been having some trouble with runtime error 2465- "Microsoft access cant find the field "I" referred to in your expression" I'm trying to ms access error 2110 select a record from a list box and then open a form with that records details filled out in the fields of the form. Both ISBN and Copy No are key fields if this makes a difference. Heres the code: Private
Runtime Error 2110 Can't Move Focus To The Control
Sub DeleteBook_Click() Dim strDocName As String, strCriteria As String Dim strCaption As String, strPupil As String strDocName = "frmDeleteBooks" strCriteria = ("ISBN='" & Me![LstBooks] & "'") And ([Copy No] = Me![LstBooks].Column(1)) DoCmd.OpenForm strDocName, , , strCriteria End Sub I can get it to open a form with the right ISBN but i have trouble getting it to take the Copy No into account aswell. ISBN is a string, Copy No is an integer. Any help is appreciated. Will123 View Public Profile Find
Run Time Error 2501
More Posts by Will123 02-16-2009, 08:54 AM #2 pbaldy Wino Moderator Join Date: Aug 2003 Location: Nevada, USA Posts: 28,874 Thanks: 6 Thanked 3,228 Times in 3,174 Posts Re: Help with Runtime Error 2465 You started out right and then stopped concatenating your string. Try this: strCriteria = ("ISBN='" & Me![LstBooks] & "') And ([Copy No] = " & Me![LstBooks].Column(1) & ")" __________________ Paul Microsoft Access MVP To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. pbaldy View Public Profile Find More Posts by pbaldy 02-16-2009, 09:06 AM #3 Will123 Registered User Join Date: Feb 2009 Posts: 5 Thanks: 0 Thanked 0 Times in 0 Posts Re: Help with Runtime Error 2465 Thats great! Thanks alot for the quick reply, it's working fine now. Will123 View Public Profile Find More Posts by Will123 02-16-2009, 09:08 AM #4 pbaldy Wino Moderator Join Date: Aug 2003 Location: Nevada, USA Posts: 28,874 Thanks: 6 Thanked 3,228 Times in 3,174 Posts Re: Help with Runtime Error 2465 No problem, and welcome to the site by the way. __________________ Paul Microsoft Access MVP To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. pbaldy View Public Profile Find More Posts by pbaldy
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the runtime error 2105 company Business Learn more about hiring developers or posting ads with us Stack Overflow
Runtime Error 2105 You Can't Go To The Specified Record
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 runtime error 2105 vba million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Run-time error '2465' can't find the field '|1' referred to in your expression up vote 0 down vote favorite http://www.access-programmers.co.uk/forums/showthread.php?t=165968 I keep getting the message Run-time error '2465' ...can't find the field '|1' referred to in your expression, please help! Option Compare Database Dim conDatabase As New ADODB.Connection Dim strConnection As String Dim strStatement As String Dim rstSL As ADODB.Recordset Dim SLVers As String Dim strSL_ID(1 To 4) As String Dim sl(1 To 4, 0 To 3) As Variant Private Sub Load_Spec() Dim x, y As Integer SLVers = [txtVer] <---Error conDatabase.ConnectionString = http://stackoverflow.com/questions/25258707/run-time-error-2465-cant-find-the-field-1-referred-to-in-your-expression "Provider=SHLKCLI10;" _ & "Server=10.210.130.90;" _ & "Database=MACHINE;" _ conDatabase.Open Set rstSL = New ADODB.Recordset strSL_ID(1) = "SL_BLT_SPD_" & SLVers strSL_ID(2) = "SL_ETC_LOS_" & SLVers strSL_ID(3) = "SL_MOD_1_HF_" & SLVers strSL_ID(4) = "SL_MOD_1_HNO3_" & SLVers For x = 1 To 4 strStatement = "SELECT dbo.SPEC_LIMIT.SL_USL,dbo.SPEC_LIMIT.SL_LSL,dbo.SPEC_LIMIT.SL_UCL,dbo.SPEC_LIMIT.SL_LCL FROM dbo.SPEC_LIMIT WHERE (((dbo.SPEC_LIMIT.SL_ID) Like '" + strSL_ID(x) + "'))" Set rstSL = conDatabase.Execute(strStatement) sl(x, 0) = rstSL(0).Value sl(x, 1) = rstSL(1).Value sl(x, 2) = rstSL(2).Value sl(x, 3) = rstSL(3).Value Next x Set conDatabase = Nothing End Sub I use this code for other forms without an error. sql vba access-vba ms-access-2010 share|improve this question edited Aug 12 '14 at 8:57 BFWebAdmin 2,13863167 asked Aug 12 '14 at 7:39 NoOB14 414 1 Have you tried debugging by adding message box of what is returned in txtVer? Make sure the table has the field names you are trying to refer to. The error normally associates with the field not being in the table or being misspelt. –PaulFrancis Aug 12 '14 at 8:45 Yes, as @PaulFrancis says, that field is either mispelled or doesn't exist - '|1' is a technically a valid field name, but it'd certainly be a weird one. –BFWebAdmin Aug 12 '14 at 8:59 You don't mention where this code resides. In your statement "SLVers =
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us http://stackoverflow.com/questions/25283179/run-time-error-2465-microsoft-access-cant-find-the-field-cbo-project-refere Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up run-time error '2465' microsoft access can't find time error the field 'cbo_project' refered to in your expression up vote 0 down vote favorite hello i am pretty new to VBA, i am trying to click a button to open a subform in my navigation window. i get the below error. run-time error '2465' microsoft access can't find the field 'cbo_project' refered to in your expression here is my code. could someone please help me. Public Sub runtime error 2105 populate_projects_drop_down(sfrm As String, sdrp As String) Dim sql As String, db As DAO.Database, rs As Recordset Set db = CurrentDb sql = "SELECT * FROM tbl_part_master" Set rs = db.OpenRecordset(sql, dbOpenDynaset) If Not sfrm = "navigation_form" Then For i = 0 To rs.Fields.Count - 1 If Len(rs.Fields(i).Name) > 15 Then Forms(sfrm).Controls(sdrp).AddItem rs.Fields(i).Name & ";" & Right(rs.Fields(i).Name, Len(rs.Fields(i).Name) - 12) Next i Else For i = 0 To rs.Fields.Count - 1 If Len(rs.Fields(i).Name) > 15 Then Forms(sfrm).Controls("NavigationSubform").Form.Controls(sdrp).AddItem rs.Fields(i).Name & ";" & Right(rs.Fields(i).Name, Len(rs.Fields(i).Name) - 12) Next i End If End Sub The above bold text is where the error is occuring. could you provide me with the correct code if possible. many thanks access-vba share|improve this question edited Aug 13 '14 at 9:55 Vignesh Kumar 15.5k72864 asked Aug 13 '14 at 9:54 atul patel 32 No. You're calling the function with "cbo_project" as parameter, and "cbo_project" (which seems to be a combobox) does not exist on the form. –MP24 Aug 13 '14 at 11:31 the combobox is on another form. the code is for a subroutine.so i click on a button that opens the other form and the above code should populate the combobox when ent