I have a form (which was designed in Access 2000) with the following syntax
in one of the Subs:
Select Case Me.Form
(more code)
That's it. No specific "Case X" or End Select components. Of course, this
barfs on compile. Can someone please tell me what's going on with this?
(I didn't code these; they've been handed to me for repair)
Brendan Reynolds - 27 Jan 2005 19:39 GMT
I'm not sure what the question is? The code is invalid, but I think you
already knew that? If you're asking what the original programmer's intention
might have been, then I think we probably need more context before we can
even make a guess. What's the surrounding code trying to do, and which event
procedure contains the code?

Signature
Brendan Reynolds (MVP)
>I have a form (which was designed in Access 2000) with the following syntax
> in one of the Subs:
[quoted text clipped - 7 lines]
>
> (I didn't code these; they've been handed to me for repair)
Dennis - 27 Jan 2005 21:31 GMT
Here's the entire SUB:
Private Sub labels_Click()
On Error GoTo Err_labels_Click
Select Case Me.Form
Dim stDocName As String
Dim prg_id As String
set prg_id =
stDocName = "EAP_EX_DIR_LABEL"
DoCmd.OpenReport stDocName, acPreview
Exit_labels_Click:
Exit Sub
Err_labels_Click:
MsgBox Err.Description
Resume Exit_labels_Click
End Sub
----------------------------------
I copied this directly from the Event Procedure (code). As you can see, it's
bogus. I really need some idea of WTH was being attempted, because the Sub
above tells me absolutely nothing, context-wise.
Brendan Reynolds - 27 Jan 2005 21:45 GMT
As far as I can see, Dennis, you might as well replace the whole thing with
the single line ...
DoCmd.OpenReport "EAP_EX_DIR_LABEL"
None of the rest of it seems to be doing anything useful at all.
Good luck, I'm afraid I think you're going to need it - this looks like a
mess.

Signature
Brendan Reynolds (MVP)
> Here's the entire SUB:
>
[quoted text clipped - 25 lines]
> bogus. I really need some idea of WTH was being attempted, because the Sub
> above tells me absolutely nothing, context-wise.
PC Datasheet - 28 Jan 2005 00:16 GMT
Dennis,
I specialize in adding more functionality to existing applications,
modifying existing applications and fixing problems in existing
applications. Based on your post here and your previous post it looks like
you could use some help. Contact me at my email address below if you would
like my help.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
resource@pcdatasheet.com
www.pcdatasheet.com
> I have a form (which was designed in Access 2000) with the following syntax
> in one of the Subs:
[quoted text clipped - 7 lines]
>
> (I didn't code these; they've been handed to me for repair)
Dennis - 28 Jan 2005 14:29 GMT
Thanks. I've already added you to my Contacts list from our previous email
exchange. This whole thing just landed in my lap the other day (a co-worker
assigned to this project had transferred out to another department), and I
was left picking up the pieces. Since this looked so bogus, I wanted to get
other input on it before I continued.
Dennis
> Dennis,
>
[quoted text clipped - 22 lines]
> >
> > (I didn't code these; they've been handed to me for repair)