Jumat, 05 April 2013

RE: [AccessDevelopers] Re: Select Case statement for a list box fails

 

Add a line just before the Case statement:

 

Print Me![strObjectName]

 

And see what happens.  Or put a breakpoint in and trace through the code.

 

Tobi

 

From: AccessDevelopers@yahoogroups.com [mailto:AccessDevelopers@yahoogroups.com] On Behalf Of luvmymelody
Sent: Friday, April 05, 2013 1:54 PM
To: AccessDevelopers@yahoogroups.com
Subject: [AccessDevelopers] Re: Select Case statement for a list box fails

 

 

The tblTopicList has all the data in it, so I know that there is something to look at.

Jim

--- In AccessDevelopers@yahoogroups.com, "luvmymelody" <luvmymelody@...> wrote:
>
> Hello all,
>
> I have a form with a list box based on the database I found called QrySampl. This db has a list box on it and a user chooses from the list box or dbl click the item and the query opens up in design view. I am trying to replicate the form and it bypasses the case statements and nothing happens. I am not sure what is missing here. It seems so straight forward. Below is the code on the button to open the object. I must be missing something. strObjectName and intObjectType are fields in the tblTopicList table.
>
> Thank You for any help on this.
>
> Jim Wagner
>
> Private Sub cmdShowExample_Click()
>
> If Not IsNull(Me![strObjectName]) Then
>
> Select Case Me![intObjectType]
>
> Case 1
> DoCmd.OpenQuery Me![strObjectName], acViewDesign
>
> Case 2
> DoCmd.OpenForm Me![strObjectName], acPreview
>
> Case 3
> DoCmd.OpenReport Me![strObjectName], acViewDesign
>
> End Select
>
> Else
> MsgBox "No Name in table"
> End If
>
>
> End Sub
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:

Please zip all files prior to uploading to Files section.
.

__,_._,___

Tidak ada komentar:

Posting Komentar