473,657 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Runtime error 2001

4 New Member
When I run some code behind a button i get a runtime error message. The strange thing is that the code run perfectly some months ago. Can some one help me !
Some additional information: The company I work for upgraded the citrix enviremont.

Here is the code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub knptoevoegen_Click()
  2. On Error GoTo err_knptoevoegen_click
  3. Dim filid As Variant
  4. Dim beursid As Variant
  5. Dim fout As Integer
  6.  
  7. If IsNull(Me.Klantnummer) Or IsNull(Me.Aantal) Or IsNull(Me.Beurs) Then
  8. MsgBox ("U kunt niet toevoegen. Formulier is niet volledig ingevuld ! "), vbOKOnly
  9. Forms!frmbeurskaart.FilterOn = False
  10.  
  11. Else
  12. Forms!frmbeurskaart.FilterOn = False
  13. DoCmd.GoToRecord , , acNewRec
  14.  
  15.  
  16. End If
  17.  
  18. err_knptoevoegen_click:
  19.  
  20. fout = Err.Number
  21.  
  22. Select Case fout
  23. Case 0
  24. Case 2105
  25. If MsgBox("Deze relatie heeft al beurskaarten besteldt voor deze beurs! Wilt u deze aanpassen ?", vbYesNo) = vbYes Then
  26. filid = Forms!frmbeurskaart!Klantnummer
  27. beursid = Forms!frmbeurskaart!Beurs
  28. Forms!frmbeurskaart.Filter = "Klantnummer =" & filid & "and beurs ='" & beursid & "'"
  29. Me.Undo
  30. Forms!frmbeurskaart.FilterOn = True
  31. Me.Aantal.SetFocus
  32. Else
  33. Me.Undo
  34.  
  35. End If
  36.  
  37.  
  38.  
  39. End Select
  40.  
  41.  
  42. End Sub
The error ocurs by on line 30 --> forms!frmbeursk aarten.filteron = true
Aug 13 '07 #1
7 2217
Rabbit
12,516 Recognized Expert Moderator MVP
Expand|Select|Wrap|Line Numbers
  1. Forms!frmbeurskaart.Filter = "Klantnummer =" & filid & "and beurs ='" & beursid & "'"
This needs to have a space in the between the filid and the "and"

Expand|Select|Wrap|Line Numbers
  1. Forms!frmbeurskaart.Filter = "Klantnummer =" & filid & " and beurs ='" & beursid & "'"
Aug 13 '07 #2
David01
4 New Member
Thank you for your reaction.

I tried it but I still keep the same message.

Any other suggestions?

The same code works at home fine ? I jus don't get it...
Aug 13 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
Thank you for your reaction.

I tried it but I still keep the same message.

Any other suggestions?

The same code works at home fine ? I jus don't get it...
It works fine at home?

Is it an exact duplicate?
Check your Visual Basic references under Tools > References in the Visual Basic Editor. See if you're missing any.
Try out your filter in a query and see if that's built correctly.
Aug 13 '07 #4
David01
4 New Member
Hey,

The strange thing is, when I use the original file it works fine, even on my company workspace. But when I import it into the main database I get the same error message.

I'm running out of clues.
Aug 14 '07 #5
Rabbit
12,516 Recognized Expert Moderator MVP
Hey,

The strange thing is, when I use the original file it works fine, even on my company workspace. But when I import it into the main database I get the same error message.

I'm running out of clues.
Import what into your main database?
What do you mean by original file? If your main database isn't your original then what is it?
Aug 14 '07 #6
David01
4 New Member
At my workspace I have a database running (backend and frontend). Sometimes I develop new items at home. Then I e-mail that to my worspace and import the table's, forms en query's into that database.So the e-mailed version works fine but when imported it doesn't. The strange thing is that it worked fine before. So I imported it again but that doesn't help.
Aug 15 '07 #7
Rabbit
12,516 Recognized Expert Moderator MVP
Well, since you seperated the data tables from the front end, can't you just replace your current front end with the one from home?

I think the problem may be you changed the name of some control for some reason and it can no longer find it.

You can also try compacting and repairing and/or compiling the code. Compiling should bring up some syntax errors.
Aug 15 '07 #8

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

Similar topics

11
2533
by: frr | last post by:
Hi, After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error: >>> import themes Traceback (most recent call last): File "<interactive input>", line 1, in ? File "themes.py", line 564 font = self.font.makeBlackAndWhite(), additive = self.additive,
2
4447
by: Artur | last post by:
Hi Newsgroup, im currently working on programming a asp.net application consuming an Webservice hosted on Apache/Axis. I have generated WSDL and Proxy classes from VisualStudio.net. But when trying to fire up one method i get following error: System.Web.Services.Protocols.SoapHeaderException: Method 'tns:prodsearch' not implemented
0
1276
by: Adam Smith | last post by:
Hello. I've got a total of 5 schemas. They are: 1 - 1.xsd - a description of a city 2 - 2.xsd - a description of a town 3 - CityHall.xsd - a description of a cityhall-meant to be part of a document based on 1.xsd in "user area". 4 - TownHall.xsd - a description of a townhall-meant to be part of a document based on 2.xsd in "user area". 5 - testmultischema.xsd - a document which combines in a batch instances of cities and towns based...
6
4739
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
7
3085
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything works fine. So I deploy the webservice on a remote machine (Linux box) and I get an error when calling the service. BUT: I can retrieve the WSDL and make a webreference in my VS.NET project, so obviously I (or more correct: My VS.NET project) am...
0
755
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. The same code works fine in a standalone app. I have inspected System.Runtime.Remoting.dll with ildasm, and I can see the ....Channels.Http namespace there. I verified that the virtual directory is configured to use v2.0.50727 (the error message...
2
8471
by: Y2K | last post by:
First.. I sincerely appreciate any assistance in resolving this. I've searched the entire PC for assembly.adaptive.xsd, and it's non existent. Here's the problem: I've published a standard VB.Net 2005 application to the IIS 5.0 server. I have three PCs which run my online-only application fine, and two that give the error below right after the confirmation to install the application:
1
2108
by: noneedforthis | last post by:
I'm a new user of Access/VB and ran in to this nasty wall. (Access 2003, VB6.3, Windows XP) Runtime Error 2001: You cancelled the previous operation. The highlighted line is the one where the recordsource is set to a previously defined SQL statement. What I don't understand is that the code was working perfectly for a long time and it suddenly appeared. Here's what my program does - search for items based on the owner/item type etc...
3
4687
by: AccessBeetle | last post by:
I am creating simple login form with linked tables(atual tables are in SQL 2005) in access 2003. Here is my code. Option Compare Database Private Sub cmdSignIn_Click() 'Check to see if data is entered into the UserName combo box If IsNull(Me.txtUsername) Or Me.txtUsername = "" Then MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
0
8310
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
8827
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
8732
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
8503
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
7333
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...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4158
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...
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.