ProgrammingMSAccess.com

Learn about Developers Group
Join Developers Group
Order SPAM Blocker
Free Stuff
Guest Book
.NET Resources
SQL Server Resources
Favorites
Technical Support
Books & DVDs by Webmaster
Articles, tutorials, & more
FAQs
Product Reviews
Samples
Prior Newsletters
Contact Us
Home
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a pair of event procedures for filtering the data on an access form with the authors table from the pubs database as its record source.  See the august 2000 edition of sql server magazine for more samples on filtering sql server databases from access forms.

Here's a picture of the form in Design view.

 

Here's a SELECT statement for the combo boxes Row Source property.

SELECT DISTINCT state FROM authors

 

Here's a pair of event procedures for the command button and combo box.

Private Sub cmdShow_All_Click()
Me.RecordSource = "SELECT * FROM authors"
End Sub

Private Sub cboFilterState_AfterUpdate()
Me.RecordSource = "SELECT * FROM authors " & _
"WHERE state = '" & Me.cboFilterState.Value & "'"
End Sub

 

Want to understand  Microsoft Access 2000 so that you can program it to do more tasks like this?  Get Programming Microsoft Access 2000 by Rick Dobson from Microsoft Press.  Learn more about the book by clicking here.

Copyright 2000 CAB, Inc. All rights reserved. Republication or redistribution of CAB, Inc. content, including by framing or similar means, is expressly prohibited without the prior written consent of CAB, Inc. CAB, Inc. shall not be liable for any errors in the content, or for any actions taken in reliance thereon.