Tip Malformed GUID error (3077) (1 Viewer)

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:42
Joined
Feb 28, 2001
Messages
27,001
I actually DON'T have this problem - but in working my way through my genealogy project, I once DID have this issue. In my case, the fix is quite easy.

I'm going to guess that very few of us actually work with GUIDs that often. I know I don't. So of course, out of sight, out of mind. Turns out that there is a VERY SIMPLE and in fact, PROBABLE typo that one can make to trigger this error. So to help others who actually run into this, I thought I would post a solution as a preemptive strike and include tags that might lead someone here as a POSSIBLE quick fix.

A GUID is a long string of numbers separated by dashes and it looks something like {12345-67890-02468} with many variants on that theme.

The common typographical error occurs when you make a SHIFT KEY error while intending to type the left bracket [ because the left brace { is the SHIFT of the left bracket.

So you type

Code:
    lCode = Me.[COLOR="Magenta"]{[/COLOR]CodeValue]

instead of

Code:
    lCode = Me.[COLOR="Blue"][[/COLOR]CodeValue]

When you do this, you get error 3077, Malformed GUID, because the left brace character { is the starting syntax for a GUID. I know that we can have "programmer's hypnosis" in that we see what we THOUGHT we typed, particularly when that typing occurred in the wee hours of the morning and your residual caffeine levels were slowly diminishing. IF this happens to you and you search, you MIGHT see a solution right here. If it helps you, good luck and you are welcome.

Since it is possible to have this inside quotes such as might happen when you are referencing a control name inside an SQL string, the compiler won't catch this. In fact, I am a bit surprised that the compiler didn't catch this on the actual expression I used, because that wasn't quoted. But it let it slide until it became a run-time error 3077.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 18:42
Joined
Apr 27, 2015
Messages
6,286
Being that I have work extensivley with Sharepoint, this thread brings up many memories - ALL of them bad...
 

Users who are viewing this thread

Top Bottom