If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#21
|
|||
|
|||
embed a query into a form that has the query criteria
Dear Ember,
(Like[Forms]![frmSearch]![Field Name]) Where on earth did you get this from?? In the case of removing the "*" default values in your criteria controls (good idea!), the two approaches I suggested we [Forms]![frmSearch]![Field Name] Or [Forms]![frmSearch]![Field Name] Is Null Like Nz([Forms]![frmSearch]![Field Name],"*") -- Steve Schapel, Microsoft Access MVP Ember wrote: Okay, I deleted the query and remade it, this time adding (Like[Forms]![frmSearch]![Field Name]) one at a time. I also took out the "default" value of "*" out of my search criteria. It is working now. The subform is refreshing to show all records that contain the selected criteria. However, it only works for the "Or" sequence and not the "And". The purpose of the Search form is to allow users to filter the records to match the criteria. Example: If they seleted "ABC Company" under "Entity" and "Central Filing System" the return should show only those records for ABA Company that are in the Central Filing System. As of now I can get the "Or" sequence to work, but that results in showing any record for ABC Comapny OR any record stored in the Central Filing System. Two very different results. |
#22
|
|||
|
|||
embed a query into a form that has the query criteria
I got that from the query. When I just enter [Forms]![frmSearch]![Field
Name] it adds the "Like" to the beginning of the line. I will try your two ideas again and see if that makes a difference. Ember "Steve Schapel" wrote: Dear Ember, (Like[Forms]![frmSearch]![Field Name]) Where on earth did you get this from?? In the case of removing the "*" default values in your criteria controls (good idea!), the two approaches I suggested we [Forms]![frmSearch]![Field Name] Or [Forms]![frmSearch]![Field Name] Is Null Like Nz([Forms]![frmSearch]![Field Name],"*") -- Steve Schapel, Microsoft Access MVP Ember wrote: Okay, I deleted the query and remade it, this time adding (Like[Forms]![frmSearch]![Field Name]) one at a time. I also took out the "default" value of "*" out of my search criteria. It is working now. The subform is refreshing to show all records that contain the selected criteria. However, it only works for the "Or" sequence and not the "And". The purpose of the Search form is to allow users to filter the records to match the criteria. Example: If they seleted "ABC Company" under "Entity" and "Central Filing System" the return should show only those records for ABA Company that are in the Central Filing System. As of now I can get the "Or" sequence to work, but that results in showing any record for ABC Comapny OR any record stored in the Central Filing System. Two very different results. |
#23
|
|||
|
|||
embed a query into a form that has the query criteria
THANK YOU, THANK YOU! I am not sure why it worked this time, but it does.
Not only can I see all the records I can filter the results based on one, two, three, etc criteria!!!! YEAH!!! Thank you Steve! If you are ever in the Puget Sound area of Washington State drop me a line and I will buy you a beer! Ember "Steve Schapel" wrote: Dear Ember, (Like[Forms]![frmSearch]![Field Name]) Where on earth did you get this from?? In the case of removing the "*" default values in your criteria controls (good idea!), the two approaches I suggested we [Forms]![frmSearch]![Field Name] Or [Forms]![frmSearch]![Field Name] Is Null Like Nz([Forms]![frmSearch]![Field Name],"*") -- Steve Schapel, Microsoft Access MVP Ember wrote: Okay, I deleted the query and remade it, this time adding (Like[Forms]![frmSearch]![Field Name]) one at a time. I also took out the "default" value of "*" out of my search criteria. It is working now. The subform is refreshing to show all records that contain the selected criteria. However, it only works for the "Or" sequence and not the "And". The purpose of the Search form is to allow users to filter the records to match the criteria. Example: If they seleted "ABC Company" under "Entity" and "Central Filing System" the return should show only those records for ABA Company that are in the Central Filing System. As of now I can get the "Or" sequence to work, but that results in showing any record for ABC Comapny OR any record stored in the Central Filing System. Two very different results. |
#24
|
|||
|
|||
embed a query into a form that has the query criteria
Ember wrote:
I got that from the query. When I just enter [Forms]![frmSearch]![Field Name] it adds the "Like" to the beginning of the line. Ember, this is not normal behaviour. -- Steve Schapel, Microsoft Access MVP |
#25
|
|||
|
|||
embed a query into a form that has the query criteria
Ember,
Lovely. I knew we'd get there eventually! If you ever come to New Zealand, bring the beer with you :-). -- Steve Schapel, Microsoft Access MVP Ember wrote: THANK YOU, THANK YOU! I am not sure why it worked this time, but it does. Not only can I see all the records I can filter the results based on one, two, three, etc criteria!!!! YEAH!!! Thank you Steve! If you are ever in the Puget Sound area of Washington State drop me a line and I will buy you a beer! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customers- Contracts form problem | GL | Using Forms | 10 | February 7th, 2006 04:05 PM |
using a form with combo box to input criteria | Christina | Using Forms | 16 | February 3rd, 2006 08:47 PM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 04:11 AM |
Form to Enter Report Criteria works, but Query won't run from Macr | BARKAROO | Using Forms | 1 | October 16th, 2004 08:13 PM |
Taher | Setting Up & Running Reports | 1 | August 31st, 2004 09:07 PM |