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)
strKey could be "one", for example, and varValue (type Variant) could be 1.
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)
Code:
col.Add CInt(varValue), strKey
Comment