473,324 Members | 2,473 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,324 software developers and data experts.

VBA Collections Getting Corrupted

43
Has anyone experienced this before? My code is set up and has been working fine, assigning strings, integers and longs, along with other sub-collections to a main Collection. The collection is defined globally and I use it to hold values the application references.

I'm getting the same errors on both Access 2003 and Access 97.

The problem seems to be coming when I assign a member to a collection. If I am in an open form and call a module that does the assignment, under certain conditions it seems to be assigning a whole set of properties from the form I have open instead of the value I am trying to assign.

It does not do it all the time, but it is consistent when I pull attempt to pull certain data into the form.

I've had this happen before a few monthse ago and noticed at that time that it seemed to do it when I was assigning an integer to the collection. I was able to correct it by explicitly using CInt to ensure it was an integer getting assigned.

Why would it assign a set of field properties instead of the intended data?

Here is an example of the code for when the varType = 2 (Integer)
Expand|Select|Wrap|Line Numbers
  1.         col.Add CInt(varValue), strKey
  2.  
strKey could be "one", for example, and varValue (type Variant) could be 1.
Jun 26 '12 #1
1 1178
Sedrick
43
Looks like I've found the problem!

I was checking for just about all varTypes except for two - Nulls and empty strings.

The problem seemed to be occurring when it encountered null values to assign to the collection. I simply changed null values to "" and it took care of it!

Thanks for your interest.
Jun 26 '12 #2

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

Similar topics

0
by: Shiv | last post by:
I have a servlet driven web application using ServletExec 4.2 AS, IIS 4.0 as the platform. Some user data is stored is persisted in a user object at the beginning of the session which includes use...
0
by: weldonj | last post by:
I upgraded to MySQL 4.1.1-alpha-standard the other night and ever since then at least twice a day my main message board table will crash. Here's what i get when I check on the board or analyze...
4
by: Paul Jackson | last post by:
I have the following situation: class Y; class Z; class X { public: Y y; Z* z; };
0
by: Alejandro Penate-Diaz | last post by:
hi. I am sending attachments and for some reason the files are getting corrupted and a different size than the original file. I am sending word and excel documents. below is the code I am using ...
2
by: TS | last post by:
I have some inner exceptions on dev and production server saying: Invalid character in a Base-64 string. OR Invalid Length of a Base-64 string or something like that. I cannot recreate this...
6
by: oskar | last post by:
Hello everyone. I have a problem with my program... and i kinda dunno what to do.. everything seems to work ok, but i'm getting corrupted double-linked list error =\. *** glibc detected ***...
0
by: rejithes | last post by:
Hi, I had an application in which database swing will happen automatically. Some of my tables have field datatype - TEXT. It is found that the TEXT datatype is getting corrupted after database...
1
by: Rohith KS | last post by:
Hi i am using CDOSYS to send mails to the users from my application. Everything is working fine, mails are being sent to the user but in the mail the user receives, some extra characters such as...
3
by: Jake | last post by:
I am writing a script that allows people to upload a CSV file for processing and I am having trouble with accented characters. If a UTF-8 encoded file is uploaded, everything works fine. The...
1
by: Tonia | last post by:
When I click on Play now for my online game Project 69, it tells me "error, click for details" and the screen is all white. It won't let me click. I've tried uninstalling Java and reinstalling it,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.