473,748 Members | 10,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MS Access Database Runtime Error 2137

1 New Member
I am having an issue with an Access Database that worked at one time and after a Windows Update that screwed up the profile it stopped working. The following is what VB is stating causes the error. Any help would be greatly appreciated.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.FindRecord c, acEntire, True, acSearchAll, True, acCurrent, True
  2.  
This is part of another group:
Expand|Select|Wrap|Line Numbers
  1. Private Sub name_Change()
  2. Dim c As String
  3. c = Me!name
  4. DoCmd.GoToControl "ACCOUNT"
  5. DoCmd.FindRecord c, acEntire, True, acSearchAll, True, acCurrent, True
  6. DoCmd.GoToControl "FIRST NAME"
  7. End Sub
  8.  
  9. Which is part of a whole group:
  10.  
  11. Option Compare Database
  12. Option Explicit
  13.  
  14. Private Sub ADDRESS_Exit(Cancel As Integer)
  15. Me.Refresh
  16. End Sub
  17.  
  18. Private Sub CITY_Exit(Cancel As Integer)
  19. Me.Refresh
  20. End Sub
  21.  
  22. Private Sub Combo56_Change()
  23. Dim db As Database, cr As Recordset, a
  24. Set db = CurrentDb()
  25. Me.Refresh
  26. a = Me!Combo56
  27. DoCmd.SetWarnings False
  28. DoCmd.RunSQL "SELECT [INSTRUMENT RENTAL].[INST TYPE] INTO USYSTYPE FROM [INSTRUMENT RENTAL]WHERE ((([INSTRUMENT RENTAL].[INST TYPE])=[FORMS]![INSTRUMENT RENTAL]![combo56]));"
  29. DoCmd.SetWarnings True
  30. Set cr = db.OpenRecordset("USYSTYPE", dbOpenDynaset)
  31. If Not cr.EOF Then
  32. cr.MoveLast
  33. Me![TOTALS] = a & "S RENTED = " & cr.RecordCount
  34. Else
  35. Me![TOTALS] = a & "S RENTED = 0"
  36. End If
  37. Me!TOTALS.Visible = True
  38. cr.Close
  39. End Sub
  40.  
  41. Private Sub Command36_Click()
  42. On Error GoTo Err_Command36_Click
  43.  
  44.  
  45.     DoCmd.GoToRecord , , acFirst
  46.  
  47. Exit_Command36_Click:
  48.     Exit Sub
  49.  
  50. Err_Command36_Click:
  51.     MsgBox Err.Description
  52.     Resume Exit_Command36_Click
  53.  
  54. End Sub
  55. Private Sub Command37_Click()
  56. On Error GoTo Err_Command37_Click
  57.  
  58.  
  59.     DoCmd.GoToRecord , , acLast
  60.  
  61. Exit_Command37_Click:
  62.     Exit Sub
  63.  
  64. Err_Command37_Click:
  65.     MsgBox Err.Description
  66.     Resume Exit_Command37_Click
  67.  
  68. End Sub
  69. Private Sub Command38_Click()
  70. On Error GoTo Err_Command38_Click
  71.  
  72.  
  73.     DoCmd.GoToRecord , , acNext
  74.  
  75. Exit_Command38_Click:
  76.     Exit Sub
  77.  
  78. Err_Command38_Click:
  79.     MsgBox Err.Description
  80.     Resume Exit_Command38_Click
  81.  
  82. End Sub
  83. Private Sub Command39_Click()
  84. On Error GoTo Err_Command39_Click
  85.  
  86.  
  87.     DoCmd.GoToRecord , , acPrevious
  88.  
  89. Exit_Command39_Click:
  90.     Exit Sub
  91.  
  92. Err_Command39_Click:
  93.     MsgBox Err.Description
  94.     Resume Exit_Command39_Click
  95.  
  96. End Sub
  97. Private Sub Command40_Click()
  98. On Error GoTo Err_Command40_Click
  99.  
  100.  
  101.     Screen.PreviousControl.SetFocus
  102.     DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
  103.  
  104. Exit_Command40_Click:
  105.     Exit Sub
  106.  
  107. Err_Command40_Click:
  108.     MsgBox Err.Description
  109.     Resume Exit_Command40_Click
  110.  
  111. End Sub
  112. Private Sub Command41_Click()
  113. On Error GoTo Err_Command41_Click
  114.  
  115.  
  116.     DoCmd.GoToRecord , , acNewRec
  117.  
  118. Exit_Command41_Click:
  119.     Exit Sub
  120.  
  121. Err_Command41_Click:
  122.     MsgBox Err.Description
  123.     Resume Exit_Command41_Click
  124.    DoCmd.GoToControl "FIRST NAME"
  125. End Sub
  126. Private Sub Command42_Click()
  127. On Error GoTo Err_Command42_Click
  128.  
  129.  
  130.     DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
  131.     DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
  132.  
  133. Exit_Command42_Click:
  134.     Exit Sub
  135.  
  136. Err_Command42_Click:
  137.     MsgBox Err.Description
  138.     Resume Exit_Command42_Click
  139.  
  140. End Sub
  141. Private Sub Command43_Click()
  142. On Error GoTo Err_Command43_Click
  143.  
  144.  
  145.     DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
  146.  
  147. Exit_Command43_Click:
  148.     Exit Sub
  149.  
  150. Err_Command43_Click:
  151.     MsgBox Err.Description
  152.     Resume Exit_Command43_Click
  153.  
  154. End Sub
  155. Private Sub Command44_Click()
  156. On Error GoTo Err_Command44_Click
  157.  
  158.  
  159.     DoCmd.Close
  160.  
  161. Exit_Command44_Click:
  162.     Exit Sub
  163.  
  164. Err_Command44_Click:
  165.     MsgBox Err.Description
  166.     Resume Exit_Command44_Click
  167.  
  168. End Sub
  169.  
  170. Private Sub Command46_Click()
  171. Dim c As String
  172. Me.Refresh
  173. c = MsgBox("ARE YOU SURE YOU WANT TO PRINT ALL THE INVOICES?", vbYesNo + vbQuestion + vbDefaultButton2, "PRINT INVOICES")
  174. If c = 6 Then
  175. DoCmd.OpenReport "InstRenInv1", acViewPreview
  176. DoCmd.OpenReport "InstRenInv2", acViewPreview
  177. End If
  178. End Sub
  179.  
  180. Private Sub Command47_Click()
  181. Me.Refresh
  182. DoCmd.OpenReport "InstRenSinInv", acViewPreview
  183. End Sub
  184.  
  185. Private Sub Command51_Click()
  186. DoCmd.Quit acQuitPrompt
  187. End Sub
  188.  
  189. Private Sub Command52_Click()
  190. Dim db As Database, cr As Recordset, a
  191. Set db = CurrentDb()
  192. Me!TOTALS.Visible = False
  193. a = InputBox$("ENTER THE TYPE OF INSTRUMENT!", "INSTRUMENT TYPE")
  194. If a = "" Then
  195. GoTo FIN
  196. End If
  197. Me!HID = a
  198. DoCmd.SetWarnings False
  199. DoCmd.RunSQL "SELECT [INSTRUMENT RENTAL].[INST TYPE] INTO USYSTYPE FROM [INSTRUMENT RENTAL]WHERE ((([INSTRUMENT RENTAL].[INST TYPE])=[FORMS]![INSTRUMENT RENTAL]![HID]));"
  200. DoCmd.SetWarnings True
  201. Set cr = db.OpenRecordset("USYSTYPE", dbOpenDynaset)
  202. If Not cr.EOF Then
  203. cr.MoveLast
  204. Me![TOTALS] = a & "S RENTED = " & cr.RecordCount
  205. Else
  206. Me![TOTALS] = a & "S RENTED = 0"
  207. End If
  208. Me!TOTALS.Visible = True
  209. cr.Close
  210. GoTo FIN1
  211. FIN:
  212. MsgBox "YOU DID NOT ENTER AN INSTRUMENT TYPE!"
  213. FIN1:
  214. End Sub
  215.  
  216. Private Sub Command58_Click()
  217. DoCmd.OpenReport "InstTable", acViewPreview
  218. End Sub
  219.  
  220. Private Sub Command59_Click()
  221. DoCmd.OpenReport "PastDue", acViewPreview
  222. End Sub
  223.  
  224. Private Sub FIRST_NAME_Exit(Cancel As Integer)
  225. Me.Refresh
  226. End Sub
  227.  
  228. Private Sub Form_Activate()
  229. DoCmd.Maximize
  230. End Sub
  231.  
  232. Private Sub Form_Load()
  233. Dim db As Database, cr As Recordset, a As Integer
  234. Set db = CurrentDb()
  235. Set cr = db.OpenRecordset("SELECT [INSTRUMENT RENTAL].[FIRST NAME], [INSTRUMENT RENTAL].[LAST NAME], [INSTRUMENT RENTAL].ADDRESS, [INSTRUMENT RENTAL].[MAILING ADDRESS], [INSTRUMENT RENTAL].CITY, [INSTRUMENT RENTAL].STATE, [INSTRUMENT RENTAL].ZIP, [INSTRUMENT RENTAL].[HOME PHONE], [INSTRUMENT RENTAL].[WORK PHONE], [INSTRUMENT RENTAL].[INST TYPE], [INSTRUMENT RENTAL].[INST MFR], [INSTRUMENT RENTAL].[SERIAL NO], [INSTRUMENT RENTAL].[PURCHASE PRICE], [INSTRUMENT RENTAL].[PURCHASE BALANCE], [INSTRUMENT RENTAL].[RENTAL FEE], [INSTRUMENT RENTAL].[LATE FEE], [INSTRUMENT RENTAL].[OVERDUE PMT], [INSTRUMENT RENTAL].ACCOUNT FROM [INSTRUMENT RENTAL]WHERE ((([INSTRUMENT RENTAL].[OVERDUE PMT])>0));", dbOpenDynaset)
  236. If Not cr.EOF Then
  237. cr.MoveLast
  238. a = cr.RecordCount
  239. MsgBox "THERE ARE " & "(" & a & ")" & " CUSTOMERS WHO HAVE PAST DUE BALANCES! PRESS THE PAST DUE BALANCES OPTION BUTTON TO VIEW THEM!"
  240. End If
  241. End Sub
  242.  
  243. Private Sub INST_TYPE_Exit(Cancel As Integer)
  244. Me.Refresh
  245. End Sub
  246.  
  247. Private Sub LAST_NAME_Exit(Cancel As Integer)
  248. Me.Refresh
  249. End Sub
  250.  
  251. Private Sub MAILING_ADDRESS_Exit(Cancel As Integer)
  252. Me.Refresh
  253. End Sub
  254.  
  255. Private Sub name_Change()
  256. Dim c As String
  257. c = Me!name
  258. DoCmd.GoToControl "ACCOUNT"
  259. DoCmd.FindRecord c, acEntire, True, acSearchAll, True, acCurrent, True
  260. DoCmd.GoToControl "FIRST NAME"
  261. End Sub
  262.  
  263. Private Sub Option60_Click()
  264. Dim db As Database, cr As Recordset, a As Integer
  265. Set db = CurrentDb()
  266. Set cr = db.OpenRecordset("SELECT [INSTRUMENT RENTAL].[FIRST NAME], [INSTRUMENT RENTAL].[LAST NAME], [INSTRUMENT RENTAL].ADDRESS, [INSTRUMENT RENTAL].[MAILING ADDRESS], [INSTRUMENT RENTAL].CITY, [INSTRUMENT RENTAL].STATE, [INSTRUMENT RENTAL].ZIP, [INSTRUMENT RENTAL].[HOME PHONE], [INSTRUMENT RENTAL].[WORK PHONE], [INSTRUMENT RENTAL].[INST TYPE], [INSTRUMENT RENTAL].[INST MFR], [INSTRUMENT RENTAL].[SERIAL NO], [INSTRUMENT RENTAL].[PURCHASE PRICE], [INSTRUMENT RENTAL].[PURCHASE BALANCE], [INSTRUMENT RENTAL].[RENTAL FEE], [INSTRUMENT RENTAL].[LATE FEE], [INSTRUMENT RENTAL].[OVERDUE PMT], [INSTRUMENT RENTAL].ACCOUNT FROM [INSTRUMENT RENTAL]WHERE ((([INSTRUMENT RENTAL].[OVERDUE PMT])>0));", dbOpenDynaset)
  267. Me.RecordSource = "SELECT [INSTRUMENT RENTAL].[FIRST NAME], [INSTRUMENT RENTAL].[LAST NAME], [INSTRUMENT RENTAL].ADDRESS, [INSTRUMENT RENTAL].[MAILING ADDRESS], [INSTRUMENT RENTAL].CITY, [INSTRUMENT RENTAL].STATE, [INSTRUMENT RENTAL].ZIP, [INSTRUMENT RENTAL].[HOME PHONE], [INSTRUMENT RENTAL].[WORK PHONE], [INSTRUMENT RENTAL].[INST TYPE], [INSTRUMENT RENTAL].[INST MFR], [INSTRUMENT RENTAL].[SERIAL NO], [INSTRUMENT RENTAL].[PURCHASE PRICE], [INSTRUMENT RENTAL].[PURCHASE BALANCE], [INSTRUMENT RENTAL].[RENTAL FEE], [INSTRUMENT RENTAL].[LATE FEE], [INSTRUMENT RENTAL].[OVERDUE PMT], [INSTRUMENT RENTAL].ACCOUNT FROM [INSTRUMENT RENTAL]WHERE ((([INSTRUMENT RENTAL].[OVERDUE PMT])>0));"
  268. Forms![INSTRUMENT RENTAL]![name].RowSource = "SELECT [INSTRUMENT RENTAL].ACCOUNT,[INSTRUMENT RENTAL].[LAST NAME], [INSTRUMENT RENTAL].[FIRST NAME], [INSTRUMENT RENTAL].ADDRESS, [INSTRUMENT RENTAL].[HOME PHONE]FROM [INSTRUMENT RENTAL]WHERE ((([INSTRUMENT RENTAL].[OVERDUE PMT]) > 0))ORDER BY [INSTRUMENT RENTAL].[LAST NAME];"
  269. Me.Requery
  270. If Not cr.EOF Then
  271. cr.MoveLast
  272. a = cr.RecordCount
  273. MsgBox "THE FOLLOWING " & "(" & a & ")" & " CUSTOMERS HAVE PAST DUE BALANCES!"
  274. Forms![INSTRUMENT RENTAL]![PAST DUE BALANCE].ForeColor = 255
  275. Else
  276. Me.RecordSource = "SELECT [INSTRUMENT RENTAL].* FROM [INSTRUMENT RENTAL]ORDER BY [INSTRUMENT RENTAL].[LAST NAME];"
  277. Forms![INSTRUMENT RENTAL]![name].RowSource = "SELECT [INSTRUMENT RENTAL].ACCOUNT,[INSTRUMENT RENTAL].[LAST NAME], [INSTRUMENT RENTAL].[FIRST NAME], [INSTRUMENT RENTAL].ADDRESS, [INSTRUMENT RENTAL].[HOME PHONE] FROM [INSTRUMENT RENTAL] ORDER BY [INSTRUMENT RENTAL].[LAST NAME];"
  278. Forms![INSTRUMENT RENTAL]![PAST DUE BALANCE].ForeColor = 0
  279. Me.Requery
  280. MsgBox "THE ARE NO CUSTOMERS WHO HAVE PAST DUE BALANCES!"
  281. End If
  282. End Sub
  283.  
  284. Private Sub Option65_Click()
  285. Me.RecordSource = "SELECT [INSTRUMENT RENTAL].* FROM [INSTRUMENT RENTAL]ORDER BY [INSTRUMENT RENTAL].[LAST NAME];"
  286. Forms![INSTRUMENT RENTAL]![name].RowSource = "SELECT [INSTRUMENT RENTAL].ACCOUNT,[INSTRUMENT RENTAL].[LAST NAME], [INSTRUMENT RENTAL].[FIRST NAME], [INSTRUMENT RENTAL].ADDRESS, [INSTRUMENT RENTAL].[HOME PHONE] FROM [INSTRUMENT RENTAL] ORDER BY [INSTRUMENT RENTAL].[LAST NAME];"
  287. Forms![INSTRUMENT RENTAL]![PAST DUE BALANCE].ForeColor = 0
  288. Me.Requery
  289. End Sub
  290.  
  291. Private Sub STATE_Exit(Cancel As Integer)
  292. Me.Refresh
  293. End Sub
  294.  
  295. Private Sub ZIP_Exit(Cancel As Integer)
  296. Me.Refresh
  297. End Sub
Dec 24 '09 #1
1 3041
debasisdas
8,127 Recognized Expert Expert
Kindly mention which block of code is causing the error.also mention the error number and error message.
Dec 24 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
18670
by: Phil Powell | last post by:
<cfquery name="getAll" datasource="#request.dsn#"> SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn, U.choiceId, U.experience, T.label AS teamLabel, R.label AS roleLabel FROM User U LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID, Role R, UserRoleAssoc URA, Team T WHERE U.userID = URA.userID AND URA.roleID = R.roleID AND U.userId > 1
5
15122
by: Nathan Bloom | last post by:
Hi, I have a secured database that runs fine on the computer the database is installed on. I have several workstations with access runtime installed that also need access to the database. Access runtime runs fine when accessing an unsecured version of the database. However once the database was secured it generates a runtime error after asking for the user and password and won't open. The shortcut to the secured database is: "path...
49
14350
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
7
8867
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6598
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
4
4400
by: Aliza Klein | last post by:
Apologies in advance as I am SURE this has been asked 100 times - but I haven't got a simple answer: I have MS Office XP Developer and have created an installation package (with the runtime) for an Access 2002 database. The problem: when installing on a Windows XP machine, I get the following error: The Office System Pack cannot be installed on this system because it
6
539
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by surfin it in multiple browsers simultaneously the site generates a generic runtime error after awhile. I'm thinking this has something to do with my access database and multiple connections. I'm using forms authentication with a login page. Is...
11
4609
by: DraguVaso | last post by:
Hi, I want to make a small application in VB.NET that relinks all the query's and tables in an Access database that are linked via ODBC to an SQL Server. It must be able to relink all the tables and query's to a given databse, on a given sql server with given login and password. Aybody knows how to do that, or better: has a sample application doing this? Thanks in advance!
0
2164
by: Yelena Varshal via AccessMonster.com | last post by:
Hello We have a shortcut for our MS ACCESS application that uses a /Runtime switch because we may have some users that use Runtime. The application worked fine in Access 2000 and was tested with 2003 in the spring. Now that we started to use it with MS ACCESS 2003 (Full version) we are getting the error on the last form close when exiting the application. We don't have this error if deleting /Runtime switch from the shortcut.. The error...
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.