Supportforum

Help, Feedback, Feature-Requests, Tipps for OASIS-SVN

Finally: Workaround for VBA annoying seemingly random upcase/downcase switching

  • Posts: 75
  • Thank you received: 1

KorndoerferI created the topic: Finally: Workaround for VBA annoying seemingly random upcase/downcase switching

Observation:
- Access changes primary key names that are used in code in a seemingly random manner.
- i.e.: It would change [OperatorID] to [OperatorId] (OperatorID is a primary key in my "operators" table)
- As a consequence, OASIS thought the object was changed and suggested to export it (and many of them, every time).
- Simply replacing all instances of "OperatorId" in vba to "OperatorID" is not possible. It instantly reverts back.
- To avoid overloading co-workers with meaningless updates/imports, one had to check each and every single object before comitting, and reverting the changes, if that is all that was different.

Solution:
- Generate a new Access Module (or use an existing one)
- Add a line "Dim OperatorID" (although "OperatorID" was never used in VBA code, but it was only addressed i.e. in a where clause of an SQL statement used in VBA as, i.e. "Where [OperatorId] = 31"[which could, see above, not be fixed])
- NOW replace all occurences of "OperatorId" to "OperatorID" throughout the complete vba code
- The changes will now NOT revert back anymore.
#507

Please Log in to join the conversation.

Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
Ok