Select Case Me.Form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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)
 
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?
 
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
 
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.
 
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.
 
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
 
Back
Top