Microsoft
Software
Hardware
Network
Question : Application.RunCommand acCmdSubformFormView Causes Runtime error 2501
I am developing a database for an overseas customer. As there is a 5 hr time lag between us.. it is a bit hard for me to see what is going on exactly, but this is it in a nutshell. On a main form, I have a subform SearchResults. When the user selects a record in the subform and clicks a command button (cmdSwitch), the subform view toggles back and forth between datasheet and form view so that they can isolate some fields of interest.
This works fine on my PC and laptops, and it works fine on my counterpart's laptop over there. However, when the database was rolled out company wide over there, an error pops up (2501) whenever they hit the toggle button. I have verified the obvious, like they are working with ACCESS 2000, etc.
Private Sub cmdSwitch_Click()
Me.SearchResults.Locked = False
If Me.SearchResults.Form.Curr
entView = 1 Then
Me.SearchResults.SetFocus
Application.RunCommand acCmdSubformDatasheetView
Else
Me.SearchResults.SetFocus
Application.RunCommand acCmdSubformFormView
End If
Me.SearchResults.Locked = True
End Sub
In the debugger, the line Application.RunCommand gets highlighted. I'm stumped. If I could reproduce the error of course this would be easier, but I need to know what I can tell them to try without being able to put my hands on it. Their developer at least is backing me up by showing that on his laptop, there are no errors. First one to come up with the solution gets the points and an 'A'. I'll try anything reasonable.
Answer : Application.RunCommand acCmdSubformFormView Causes Runtime error 2501
Also, if I'm not mistaken you can toggle back and forth between the two views simply by doing this;
Me.SearchResults.SetFocus
DoCmd.RunCommand acCmdSubformDatasheet
Random Solutions
Runtime Error 424 "Object Required"
Populate Table from Multiple Calculated Field on a Form in Access
button width: changed from IE6 to IE7 and now button length is very large
Error 8007000D when updating Vista machine via WSUS server.
How can I create a distribution list in Gmail? I have followed the steps that they have given, but am still unable to create a Gmail distribution list
How can I retrieve OS and Hardware Device Information using Compact Framework in VB only?
MS SQL Output producing duplicate data
VB.NET Lambda/LINQ batch function
If there are multiple inf files on the computer which have the same VID/PID as your device, how does windows choose which driver to use?
Cannot disable hibernation in Vista