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 |
#1
|
|||
|
|||
checking acct form... help with filter
good day all,
Currently I have two different forms setup along with two different queries based on my tblcheckingaccout The reason being is that I have : frmchecking (continuos form) - qrycheckingaccount - contains only those records that have not be reconciled (ckbox reconciled is false) frmcheckingfullrpting (continuos form) - qrycheckingaccountfullrpting (contains all records) both the forms have the same layout and fields: ID Reconciled Description Debit Credit there is also a frmcheckingAdd/Edit that has account type, reference, charge catagory and I open it based on the ID from main form to this form. What I am wanting to do is have one form, that would default and open up to all records, but have button (checking acct) and only those records that matched the following criteria (reconciled = false, account type = checking) are true. How would I go about doing this? Any suggestions? Thanks, Brook |
#2
|
|||
|
|||
checking acct form... help with filter
Look at the filter property on the form.
HTH; Amy "Brook" wrote in message ... good day all, Currently I have two different forms setup along with two different queries based on my tblcheckingaccout The reason being is that I have : frmchecking (continuos form) - qrycheckingaccount - contains only those records that have not be reconciled (ckbox reconciled is false) frmcheckingfullrpting (continuos form) - qrycheckingaccountfullrpting (contains all records) both the forms have the same layout and fields: ID Reconciled Description Debit Credit there is also a frmcheckingAdd/Edit that has account type, reference, charge catagory and I open it based on the ID from main form to this form. What I am wanting to do is have one form, that would default and open up to all records, but have button (checking acct) and only those records that matched the following criteria (reconciled = false, account type = checking) are true. How would I go about doing this? Any suggestions? Thanks, Brook |
#3
|
|||
|
|||
checking acct form... help with filter
What do you mean? that is the point of my question...
how do I set up a filter based on two properties Brook "Amy Blankenship" wrote: Look at the filter property on the form. HTH; Amy "Brook" wrote in message ... good day all, Currently I have two different forms setup along with two different queries based on my tblcheckingaccout The reason being is that I have : frmchecking (continuos form) - qrycheckingaccount - contains only those records that have not be reconciled (ckbox reconciled is false) frmcheckingfullrpting (continuos form) - qrycheckingaccountfullrpting (contains all records) both the forms have the same layout and fields: ID Reconciled Description Debit Credit there is also a frmcheckingAdd/Edit that has account type, reference, charge catagory and I open it based on the ID from main form to this form. What I am wanting to do is have one form, that would default and open up to all records, but have button (checking acct) and only those records that matched the following criteria (reconciled = false, account type = checking) are true. How would I go about doing this? Any suggestions? Thanks, Brook |
#4
|
|||
|
|||
checking acct form... help with filter
Brook,
Here is a quick example for you that will use the same button to apply filter and change the button caption as needed: If Me.FilterOn = True Then Me.FilterOn = False Me!YourCommandButtonName.Caption = "Unreconciled Checks Only" Else Me.Filter = "[Reconciled] = True AND [Account Type] = 'Checking'" Me.FilterOn = True Me!YourCommandButtonName.Caption = "Show All Entries" End If You will need to modify this for your command button name HTH -- Gary Miller Sisters, OR "Brook" wrote in message ... What do you mean? that is the point of my question... how do I set up a filter based on two properties |
#5
|
|||
|
|||
checking acct form... help with filter
Gary,
thnaks for the post, I added the code but am getting a run-time error "2448". You cannot assign a value to this object. When I click the debug button it goes to this portion of code: Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" Brook "Gary Miller" wrote: Brook, Here is a quick example for you that will use the same button to apply filter and change the button caption as needed: If Me.FilterOn = True Then Me.FilterOn = False Me!YourCommandButtonName.Caption = "Unreconciled Checks Only" Else Me.Filter = "[Reconciled] = True AND [Account Type] = 'Checking'" Me.FilterOn = True Me!YourCommandButtonName.Caption = "Show All Entries" End If You will need to modify this for your command button name HTH -- Gary Miller Sisters, OR "Brook" wrote in message ... What do you mean? that is the point of my question... how do I set up a filter based on two properties |
#6
|
|||
|
|||
checking acct form... help with filter
Brook,
It may be that you have an extra quote in your criteria line after [accounttype] This... Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" should be... Me.Filter = "[Reconciled] = True AND [accounttype] = 'Checking'" Also, double check that your AllowFilters property for the form is set to true in the Data tab of the form properties. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, thnaks for the post, I added the code but am getting a run-time error "2448". You cannot assign a value to this object. When I click the debug button it goes to this portion of code: Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" Brook |
#7
|
|||
|
|||
checking acct form... help with filter
Thank you very much....
That was perfect! have a wonderful day... Brook "Gary Miller" wrote: Brook, It may be that you have an extra quote in your criteria line after [accounttype] This... Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" should be... Me.Filter = "[Reconciled] = True AND [accounttype] = 'Checking'" Also, double check that your AllowFilters property for the form is set to true in the Data tab of the form properties. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, thnaks for the post, I added the code but am getting a run-time error "2448". You cannot assign a value to this object. When I click the debug button it goes to this portion of code: Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" Brook |
#8
|
|||
|
|||
checking acct form... help with filter
Gary,
I have another question for you, what if I want the accounttype of contain multiple names for the filter? I.E. 'Checking' and/or 'checking/Expense'. Thanks, Brook "Gary Miller" wrote: Brook, It may be that you have an extra quote in your criteria line after [accounttype] This... Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" should be... Me.Filter = "[Reconciled] = True AND [accounttype] = 'Checking'" Also, double check that your AllowFilters property for the form is set to true in the Data tab of the form properties. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, thnaks for the post, I added the code but am getting a run-time error "2448". You cannot assign a value to this object. When I click the debug button it goes to this portion of code: Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" Brook |
#9
|
|||
|
|||
checking acct form... help with filter
Brook,
Now you are getting toward full functionality! If you have covered your bases well with your design, you are pulling the account types from a table, hopefully using a combobox to limit the users choices when they fill out a check on the register. If you do have a lookup table you can create a combobox to select between 'Checking', 'Checking/Expense' or whatever other types you have. Now you can reference the whatever the content of that combobox is when you run your filter. Assuming that you are always toggling between 'All' and different types of unreconciled you could change the earlier code to something like... Dim strType as string ' Pick up the value of the combo or zero length string if empty strType = Nz(cboAccountType),"") If Me.FilterOn = True Then Me.FilterOn = False Me!YourCommandButtonName.Caption = "Unreconciled Checks Only" Else ' If the entry length is longer than zero (a type was selected) If Len(strType) 0 Then Me.Filter = "[Reconciled] = False AND [accounttype] = '" & Me!cboAccountType & "'" Else ' Show all UnReconciled regardless of type Me.Filter = "[Reconciled] = False End If Me.FilterOn = True Me!YourCommandButtonName.Caption = "Show All Entries" End If Be careful on the line where you reference the combobox. For a string data type that should read... [accounttype] equals singlequote doublequote ampersand Me!cboAccountType ampersand doublequote singlequote doublequote Sometimes things like this will be triggered directly from the combobox AfterUpdate. You will have to modify your button captions, of course. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, I have another question for you, what if I want the accounttype of contain multiple names for the filter? I.E. 'Checking' and/or 'checking/Expense'. Thanks, Brook "Gary Miller" wrote: Brook, It may be that you have an extra quote in your criteria line after [accounttype] This... Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" should be... Me.Filter = "[Reconciled] = True AND [accounttype] = 'Checking'" Also, double check that your AllowFilters property for the form is set to true in the Data tab of the form properties. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, thnaks for the post, I added the code but am getting a run-time error "2448". You cannot assign a value to this object. When I click the debug button it goes to this portion of code: Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" Brook |
#10
|
|||
|
|||
checking acct form... help with filter
Gary,
Actually I only want to toggle between the following : All Records and Records containing Accounttype as (Checking, Checking / Expense & Checking / Loan). Is this clear? Brook "Gary Miller" wrote: Brook, Now you are getting toward full functionality! If you have covered your bases well with your design, you are pulling the account types from a table, hopefully using a combobox to limit the users choices when they fill out a check on the register. If you do have a lookup table you can create a combobox to select between 'Checking', 'Checking/Expense' or whatever other types you have. Now you can reference the whatever the content of that combobox is when you run your filter. Assuming that you are always toggling between 'All' and different types of unreconciled you could change the earlier code to something like... Dim strType as string ' Pick up the value of the combo or zero length string if empty strType = Nz(cboAccountType),"") If Me.FilterOn = True Then Me.FilterOn = False Me!YourCommandButtonName.Caption = "Unreconciled Checks Only" Else ' If the entry length is longer than zero (a type was selected) If Len(strType) 0 Then Me.Filter = "[Reconciled] = False AND [accounttype] = '" & Me!cboAccountType & "'" Else ' Show all UnReconciled regardless of type Me.Filter = "[Reconciled] = False End If Me.FilterOn = True Me!YourCommandButtonName.Caption = "Show All Entries" End If Be careful on the line where you reference the combobox. For a string data type that should read... [accounttype] equals singlequote doublequote ampersand Me!cboAccountType ampersand doublequote singlequote doublequote Sometimes things like this will be triggered directly from the combobox AfterUpdate. You will have to modify your button captions, of course. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, I have another question for you, what if I want the accounttype of contain multiple names for the filter? I.E. 'Checking' and/or 'checking/Expense'. Thanks, Brook "Gary Miller" wrote: Brook, It may be that you have an extra quote in your criteria line after [accounttype] This... Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" should be... Me.Filter = "[Reconciled] = True AND [accounttype] = 'Checking'" Also, double check that your AllowFilters property for the form is set to true in the Data tab of the form properties. -- Gary Miller Sisters, OR "Brook" wrote in message ... Gary, thnaks for the post, I added the code but am getting a run-time error "2448". You cannot assign a value to this object. When I click the debug button it goes to this portion of code: Me.Filter = "[Reconciled] = True AND [accounttype] =" 'Checking'" Brook |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Move feild entries from form to form using global variables | JackCGW | General Discussion | 11 | November 14th, 2005 05:22 AM |
Tell if Form is a Dialog | Alex | Using Forms | 7 | August 30th, 2005 06:22 PM |
Need Help In Printing Current Record in Specific Report | RNUSZ@OKDPS | Setting Up & Running Reports | 1 | May 16th, 2005 09:06 PM |
Need query to separate 2 entry types in a table field | Jan Il | Running & Setting Up Queries | 31 | November 23rd, 2004 05:57 PM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |