473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Runtime error 2001

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!frmbeurskaarten.filteron = true
Aug 13 '07 #1
7 2207
Rabbit
12,516 Expert Mod 8TB
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
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 Expert Mod 8TB
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
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 Expert Mod 8TB
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
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 Expert Mod 8TB
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
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...
2
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...
0
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...
6
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...
7
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...
0
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. ...
2
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...
1
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...
3
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.