Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2006, 06:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Who put that "their" there!?!

Should be "there".

There!!:)

Bob

 
Old January 25th, 2006, 06:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Code:
' Check boxes for criteria defined as
    ' not mutually exclusive - dir
    ' See if any checkboxes are checked.
    Set col = New Collection
    For Each m_ctl In Me.Controls
        With m_ctl
            If .ControlType = acCheckBox Then
                If Me.Check171.Value = True The
                    col.Add m_ctl
                End If
            End If
        End With
    Next m_ctl
This won't work. You need the m_ctl variable. This is saying:

If control(x) is a checkbox, and Check171 is checked, add checkbox(x) to the collection, whether or not its checked. If Check171 isn't checked, don't add any checkboxes to the collection, including Check171.

Bob

 
Old January 25th, 2006, 06:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Just wanted to stress all this is is a SQL string building app. So pay real close attention to your strSQL variable. Debug.Print it, paste is into notepad to look at it, open a query in design view if you want, paste it into the SQL view pane and run it, etc. Just make modifications until the app spits out a valid SQL string that you can run in as a regular saved QueryDef. Then your good to go to run it from code.

Bob

 
Old January 25th, 2006, 07:50 PM
Authorized User
 
Join Date: Jan 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I made those changes and now I'm back to run-time error'2101'

setting you entered isn't valid for this property

    ' Assign strFilter to Form's RecordSourece property.
    Me.RecordSource = strFilter
    Me.Requery

End Sub

The way I ran this before I tried using this code was I had it run a query than post the results into another form and a subform. I created a second subform to display items from another table based on the results of my query. This way I could see the whole list of my results in subform 1 and in subform 2 display items(which are images) that are hyperlinked to open the image associated with the each individual record. So I guess what I need is to know how to structure this so I end up at with a results form so I can access those images.

Does that make sense?

Anyways have a good time fishing!!

-Dale








Similar Threads
Thread Thread Starter Forum Replies Last Post
Subform Filter based on Multiselect Combo boxes natwong Access 2 November 16th, 2006 10:05 AM
Subform Filter using Multiple Combo boxes natwong BOOK: Expert One-on-One Access Application Development 0 November 13th, 2006 03:07 PM
Check Boxes Allan320 Access VBA 3 June 2nd, 2006 05:45 AM
Filter by Combo Boxes Corey Access VBA 5 June 1st, 2006 07:33 PM
Using check boxes in datagrid ractim ADO.NET 2 September 8th, 2004 08:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.