Ms Access Error 3126
Links Social 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 Rate Thread Display Modes 04-30-2007, 08:58 PM #1 Bhaskara123 Registered User Join Date: Mar 2007 Posts: 11 Thanks: 0 Thanked 0 Times in 0 Posts How can i eliminate the error Hi all, i am new to VB. when i wa tested one report. I got one error that is: Run time error '3126': Invalid bracketing of name '[Forms!Main!FromDate]'. Code: FileOut = FixName("EMPerformance-" & Format(Forms!Main!FromDate.Value, "mmddyy") & "-" & Format(Forms!Main!ToDate.Value, "mmddyy") & ".xls") DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EMPerformance", TempLoc & FileOut, True, "Summary" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EMPerformanceBase", TempLoc & FileOut, True, "EM Scheduled Detail" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EMPerformanceBase-Completed", TempLoc & FileOut, True, "EM Completed Detail" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EMPerformanceBase2-NewSR", TempLoc & FileOut, True, "EM New Detail" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "EMPerformanceBase3-Pending", TempLoc & FileOut, True, "EM Pending Detail" Anyone can help me it would be very useful to me. Bhaskara123 View Public Profile Find More Posts by Bhaskara123 05-01-2007, 01:32 AM #2 Dennisk AWF VIP Join Date: Jul 2004 Posts: 1,649 Thanks: 0 Thanked 9 Times in 5 Posts Forms!Main!FromDate or [Forms]![Main]![Fromdate] Dennisk View Public Profile Find More Posts by Dennisk 05-01-2007, 09:25 PM #3 Bhaskara123 Registered User Join Date: Mar 2007 Posts: 11 Thanks: 0 Thanked 0 Times in 0 Posts Again i got one error i.e compile error Hi all, I used this code: FileOut = FixName("EMPerformance-" & Format((Forms)!(Main)!(FromDate.Value), "mmddyy") & "-" & Format(Forms!Main!ToDate.Value, "mmddyy") & ".xls") i got error like Compile error: Expected: list seperator or ) where should i put the brackets exactly? Anyone can you please help me. It would be very useful
users to search the database and when the appropraite results are clicked on the rest of the info is displayed on another form. but when i click on the results it comes up with run time error 3126 invalid bracketing of the name '[tblRefLib.Name_Of_Leaflet]' ne ides how to sort this...?? fie Fie, Mar 20, 2006 #1 Advertisements Klatuu Guest [tblRefLib]![Name_Of_Leaflet] "Fie" wrote: > Hi, > > Av set up a form that allows users to search the database and when the > appropraite results are clicked on the rest of the info is displayed on > another form. but when i click on the results it comes up with run time > error 3126 invalid bracketing of the name '[tblRefLib.Name_Of_Leaflet]' > > ne ides how to sort this...?? > > http://www.access-programmers.co.uk/forums/showthread.php?t=127692 fie > > Klatuu, Mar 20, 2006 #2 Advertisements Larry Linson Guest Yes, remove your error handling, or set in Options to Stop on all Errors. Click "Debug" and then look at the instruction which raised that error -- if the answer isn't obvious to you, then post again here... I'd _guess_ that tblRefLib and Name_Of_Leaflet need to be separately bracketed, as in [tblRefLib].[Name_Of_Leaflet] Larry Linson Microsoft Access MVP "Fie" <> wrote in message news:... > Hi, > > Av set up a form that allows users http://www.office-forums.com/threads/run-time-error-3126.527497/ to search the database and when the > appropraite results are clicked on the rest of the info is displayed on > another form. but when i click on the results it comes up with run time > error 3126 invalid bracketing of the name '[tblRefLib.Name_Of_Leaflet]' > > ne ides how to sort this...?? > > fie > Larry Linson, Mar 20, 2006 #3 Advertisements Show Ignored Content Want to reply to this thread or ask your own question? It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum. Sign Up Now! Similar Threads run-time error "3211" Michelle Rainer, Jul 17, 2003, in forum: Access Forms Replies: 0 Views: 183 Michelle Rainer Jul 17, 2003 'Run-time error 2501. The Open Form action was cancelled.' nalini singh, Aug 1, 2003, in forum: Access Forms Replies: 0 Views: 172 nalini singh Aug 1, 2003 Access Run-time error '2004' Donna, Sep 3, 2003, in forum: Access Forms Replies: 0 Views: 225 Donna Sep 3, 2003 Run time error 3426 giannis, Sep 15, 2003, in forum: Access Forms Replies: 1 Views: 188 Wayne Morgan Sep 15, 2003 Run time Error 2135 Carlos, Oct 3, 2003, in forum: Access Forms Replies: 0 Views: 246 Carlos Oct 3, 2003 Run-time error "3077" Vicki, Nov 18, 2003, in forum: Access Forms Replies: 6 Views: 162 Ken Snell Nov 19, 2003 MS Access VBA - Run-time error 3144 - Error in Update Statement , Aug 15, 200
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close https://www.experts-exchange.com/questions/28714120/querydef-error-3126.html Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > querydef error 3126 Want to Advertise Here? Solved querydef error 3126 Posted on 2015-09-15 MS Access VBA 1 Verified Solution 8 Comments 70 Views Last Modified: 2016-02-11 MSAccess 2003: A query that picks up a date from an open form suddenly comes up with the error message "3126: Invalid bracketing of name '[forms!frmreports!frmTodate]'." I replaced ms access the query with a copy from an old application. It ran ok. A few hours later the error is being reported again. It happened on my machine with 2 versions of the application and on the user copy of the app. Here is the bare code: Set qdf = CurrentDb.QueryDefs(strQuery) For intI = 0 To qdf.Parameters.Count - 1 Set prm = qdf.Parameters(intI) prm.Value = Eval(prm.Name) 'evaluate the parameter name Next ms access error intI The parameter strQuery returns the 3126 error message. Any idea what is causing the instability? Thank you Michael Brooks Maintainer of legacy MSworks 0 Question by:JMBrooks Facebook Twitter LinkedIn Google LVL 74 Best Solution byJeffrey Coachman Try it like this: Forms![frmreports]![frmTodate] And let's be clear, ...a form reference will typically point to a control. Forms![YourForm]![YourControl] ...It looks like you are pointing to Go to Solution 8 Comments LVL 74 Overall: Level 74 MS Access 72 VBA 8 Message Accepted Solution by:Jeffrey Coachman2015-09-15 Try it like this: Forms![frmreports]![frmTodate] And let's be clear, ...a form reference will typically point to a control. Forms![YourForm]![YourControl] ...It looks like you are pointing to a subform,(frmTodate) ...so it is hard to see how this is being used in a query? 0 Message Author Comment by:JMBrooks2015-09-15 Thank you for the possible syntax solution. The control is [forms!frmreports!frmTodate]: frmTodate is a text control on the frmReports referenced from the Forms collection. I will try this, and get back. 0 LVL 84 Overall: Level 84 MS Access 83 VBA 10 Message Active today Expert Comment by:Scott McDaniel (Microsoft Access MVP - EE MVE )2015-09-16 I replaced the query with a copy from an old application. It ran ok. A few hours later the error is being reported again. This concerns me - if you have an application that works now, but d