[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Dropdown List in Access for a Report

Posted on 2006-11-30
4
Medium Priority
?
242 Views
Last Modified: 2013-11-28
Hello again,
     I'm sure this is an easy question, and I have already had one very simular to it answered.  Here is a link to the last question like this one I posted: http://www.experts-exchange.com/Databases/MS_Access/Q_22061922.html

This time the dropdown will be selecting a number instead of a string.  Thank you in advance for your help.  Here is the code I'm trying to use, but of course I am getting a data type mismatch error, so please help me change it:

Option Compare Database
Option Explicit
Dim strFilter As String

Private Sub cmdOpenReport_Click()
DoCmd.OpenReport "rpt_weekly_group", acViewPreview, , strFilter
End Sub

Private Sub Detail_Click()

End Sub

Private Sub GruopID_AfterUpdate()
strFilter = ""

    If Me.GruopID <> "" And Not IsNull(Me.GruopID) Then
        If strFilter = "" Then
            strFilter = "[GruopID]= " & Chr(34) & Me.GruopID & Chr(34) & ""
        Else
            strFilter = strFilter & " and [GruopID]= " & Chr(34) & Me.GruopID & Chr(34) & ""
        End If
    End If
End Sub
0
Comment
Question by:Jon Bredensteiner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
jefftwilley earned 1000 total points
ID: 18049037
Private Sub GruopID_AfterUpdate()
strFilter = ""

    If NZ(Me.GruopID)<>"" Then
        If strFilter = "" Then
            strFilter = "[GruopID]= " & Me.GruopID
        Else
            strFilter = strFilter & " and " & [GruopID]= " & Me.GruopID
        End If
    End If
End Sub
0
 

Author Comment

by:Jon Bredensteiner
ID: 18050098
Your the best.  I love EE :)
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18050677
Anytime...hey, "Gruop"??? lol

oops
J
0
 

Author Comment

by:Jon Bredensteiner
ID: 18050995
I know, I just found that out the other day, when I kept getting errors, and after about an hour of banging my head against the keyboard I noticed "Gruop".  It is pretty much too late to change it now :)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question