Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 17th, 2004, 08:36 AM
Julian Pearcey Julian Pearcey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 Julian Pearcey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Filtering on a user-defined field

I have a form that shows three related tables in a contacts database, two in subforms. This works fine.
Because the standard filtering is a bit user-hostile I have added a text field (in the form footer) in which the user can specify a surname, and then click on a checkbox to activate the filter, which should then show the first record that corresponds to the selected name, or the next one if there is no exact match, and thereafter show successive matching records as the user selects 'next'.
The code works from the click field, and attempts to create a SQL statement to select the first valid record using the data in the text field. This is as far as I have got.
This is probably pretty simple, but I am unable to find a way of redisplaying the form just to show the filtered fields. Do I need to create a recordset for the filtered records? How do I refresh the form?

Reply With Quote
  #2  
Old November 17th, 2004, 09:40 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Julian,

Put the sql that was created as the record source for your form and then requery the form.

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Filtering on a user-defined field


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT