Thank you. My form is not in an application, it's just opened by double click on its name in the database window. Is there no way to just record the form with the filter (that will not change and does not need to be a parameter) ? Thank you
Gilbert Clauss -----Message d'origine----- De : [email protected] [mailto:[EMAIL PROTECTED] la part de Crosier, Dawn Envoye : vendredi 3 fevrier 2006 19:01 A : [email protected] Objet : RE: [ms_access] Filtering a form How are you opening the form? From a button based on the value in a combo box? I have several options on my forms which open other forms. You can just leave out the option for the strWhere (filter) if you open the same form from a different button. Then: Private Sub cmdOpenList_Click() Dim strWhere As String strWhere = "[NameOfFieldInFormBeingOpened]=" & "'" & Me![NameOfComboBox] & "'" DoCmd.OpenForm "NameOfFormBeingOpened", acNormal, strWhere End Sub Dawn Crosier Application Specialist "Education Lasts a Lifetime" This message was posted to a newsgroup. Please post replies and questions to the group so that others can learn as well. -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Clauss Gilbert Sent: Friday, February 03, 2006 9:19 AM To: '[email protected]' Subject: [ms_access] Filtering a form I would like to record a form that would be the same as another one i already have, but that would filter data (for instance field "Date of death" is null.) Is there a simple way to do that ? (Using a query instead of tables for the new form would probably be a too dangerous way, obliging to maintain the two forms separetely). I have tried to filter the form when opened, it works, then record it, but it seems to "forget" the filter when i open it again Thank you Gilbert Clauss Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
