Combo Box Yes/No error

Hello.  I have a form that I want to add a function in the footer that
will allow me to sort the records based on whether they are active or
inactive.  The field in my table is a yes/no check box that is check
for yes and unchecked for no.

I have tried to use a combo box with 2 columns, Active and Inactive
with corresponding fields yes/no check boxes.  I set it up as a 2
column count combo box and hid the yes/no column so active/inactive
would appear.  I get an error that the expression is too complex....

The information is passed to my query to the Active Yes/No column by
using:

[Forms]![ExpensesCode]![StatusCombo]

Any idea how I can make this work?  I want to avoid adding another
query, so I am trying to pass the selection to this query.

Thanks
0
nybaseball22
12/18/2007 5:43:26 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
900 Views

Similar Articles

[PageSpeed] 24

On Tue, 18 Dec 2007 09:43:26 -0800 (PST),
"nybaseball22@gmail.com" <nybaseball22@gmail.com> wrote:

>Hello.  I have a form that I want to add a function in the footer that
>will allow me to sort the records based on whether they are active or
>inactive.  The field in my table is a yes/no check box that is check
>for yes and unchecked for no.
>
>I have tried to use a combo box with 2 columns, Active and Inactive
>with corresponding fields yes/no check boxes.  I set it up as a 2
>column count combo box and hid the yes/no column so active/inactive
>would appear.  I get an error that the expression is too complex....
>
>The information is passed to my query to the Active Yes/No column by
>using:
>
>[Forms]![ExpensesCode]![StatusCombo]
>
>Any idea how I can make this work?  I want to avoid adding another
>query, so I am trying to pass the selection to this query.


Have you seen:  http://allenbrowne.com/NoYesNo.html

?

-- 
croy
0
croy
12/18/2007 6:52:38 PM
How is [Forms]![ExpensesCode]![StatusCombo] passed to the query?

One general approach is something like this in the combo box After Update 
event:
Dim strOrder as String, strSQL as String

If Me.YourComboBox = "Active" Then
    strOrder = ""
    Else
        strOrder = " DESC"
End If

strSQL = "SELECT * from YourQuery ORDER BY [Active]" & strOrder

Me.RecordSource = strSQL

This assumes the combo box has just two choices.

<nybaseball22@gmail.com> wrote in message 
news:30b3be7b-70fe-434a-9a4b-8eb59ab249b1@e4g2000hsg.googlegroups.com...
> Hello.  I have a form that I want to add a function in the footer that
> will allow me to sort the records based on whether they are active or
> inactive.  The field in my table is a yes/no check box that is check
> for yes and unchecked for no.
>
> I have tried to use a combo box with 2 columns, Active and Inactive
> with corresponding fields yes/no check boxes.  I set it up as a 2
> column count combo box and hid the yes/no column so active/inactive
> would appear.  I get an error that the expression is too complex....
>
> The information is passed to my query to the Active Yes/No column by
> using:
>
> [Forms]![ExpensesCode]![StatusCombo]
>
> Any idea how I can make this work?  I want to avoid adding another
> query, so I am trying to pass the selection to this query.
>
> Thanks 


0
BruceM
12/18/2007 7:04:20 PM
Reply:

Similar Artilces:

Advanced Find error when adding revenue column
We are using CRM 4.0 and would like to find all contacts who have parent accounts with a lifetime revenue over $50,000. The query runs great until we add the Lifetime Revenue column to display in the results. This is where we get the error. This is a hard error and can be created by using the case entity as well and linking to the customer. As soon as you add the Lifetime Revenue to the results view you get the error also. It is throwing an application error on the CRM server. Does anybody else get this error? Thanks, -- Don Meyer Double-Take Software On 19.08.2009 15:15, Don Meyer ...

a compile error,help.
#ifdef LABLE #include LABLE #endif //code above make error below.why? error C2006: #include expected a filename, found 'identifier' o_0 what the heck are you trying to do? im guessing your trying to include a file if its not already been included? #ifndef __LABLE_INCLUDED #include "lable.h" #endif - MR "msg_du" <dch1237@msn.com> wrote in message news:e4Q7OLP5EHA.2016@TK2MSFTNGP15.phx.gbl... > #ifdef LABLE > #include LABLE > #endif > > > //code above make error below.why? > > error C2006: #include expected a filename, found &#...

Get this error trying to get @live.com mail to sync with Windows M
[error messge] Account: 'pop3.live.com', Server: 'pop3.live.com', Protocol: POP3, Server Response: '-ERR command not implemented', Port: 995, Secure(SSL): Yes, Server Error: 0x800CCC90, Error Number: 0x800CCC18 You enabled an option that your mail server does not support. In Windows Mail go to Tools, Accounts, select that account, Properties, Servers, then uncheck "Log on using Secure Password Authentication". -- Gary VanderMolen, Microsoft MVP (Mail) "JbarJensen" <JbarJensen@discussions.microsoft.com> wrote in message news...

List box
I am trying to use the list box function from the control toolbar. I am not sure how to get the listings I want in the list box. Is there certain VB coding that is needed? Any help will be appreciated. Thanks. Todd No VBA code needed. In Design mode, click on your list box and select Properties from the Control toolbox (or right-click your list box and select Properties), then scroll down to the ListFillRange Property and indicate the cell range address that has the items you want to appear in the box (i.e., A1:A10). Then exit out of design mode and test your list box. MRO "Tod...

how do i view different mail boxes
I have set up different email accounts in outlook 2000. How do I choose which mail box I view when I go to outlook? btoonhoule <btoonhoule@discussions.microsoft.com> wrote: > I have set up different email accounts in outlook 2000. How do I > choose which mail box I view when I go to outlook? Using IMO or C/W mode? -- Brian Tillman ...

error code 80070057 when trying to update.
Ok, I have just installed a fresh copy of vista. I went to start installing the updates and it tried to dl the new update module. After about 3 mins, it quit, gave me the above error code, and then I got a msg saying the module installer quit working. Help please!!! This is the third try at this for me with a fresh install. Hello Eric, This error (0x80070057) indicates that the Windows HTTP proxy settings are invalid. To resolve this problem, remove the HTTP proxy settings. To do this, follow these steps: 1. Click Start, click Run, type cmd, and then click OK. 2. ...

Concatenate Multi-Select List Box Items
I need to use the chosen items in a multi-select List Box as concatenated text in another control on a subform. This text will be part of a large amount of concatenated text. How do I do this? I did find info here about using such items in a query but it was way over my head and I couldn't figure out how to convert that idea to this issue so please don't just refer me to that w/o some other explanation for this novice. For example, if the user selects: Frt Bumper, Grille, & Headlamp in the List Box, I want to then somehow concatenate those selections into a sente...

Error message
I am running exchange server 2003, SP2. I just installed IMF and it seemed be working the last couple weeks but then I noticed the spam emails have gone back up, so I suspected something is wrong with the filter, but when I went to check the settings: either when I click help or tried clicking the properties of message delivery I get an error msg then it just shuts down...below is the errror msg I get in the event viewer. Can someone please explain what this means? As far as I can remember the last few things I've done with the server, that could have caused it to not work was start...

Filtering a combo box using a combo box
All, I am trying to filter the records from a table displayed in a combo box using a combo box on the same form. I built a query and set the criteria as Me![FormName]![Combo_box]. This allowed me to filter the list, but it did not do exactly what I wanted. When the first combo box is blank, the second one is also blank. Is there anyway I can get the second combo box to display all of the records when the first box is blank? Thank you for your help. Regards, John Try a criteria in the second combo of: Like Forms!YourFormName!Combo1Name & "*" -- Arvin Meyer, MCP, MVP http:/...

colour change of dated box
How can I change the colour of a dated box of excel after the date is over. I want the programme to read date automatically from pc and change colour. try Conditional Formatting In 2003: 1. Select the cells you want to format 2. Choose Format, Conditional Formatting 3. Choose Cell Value Is from the first drop down 3. Choose Formula is from the first drop down 4. Choose less than 5. In the third box, enter =TODAY() 6. Click the Format button 7. Choose a color on the Patterns tab (or any available option) 7. Click OK twice. -- Hope this is helpful Appreciate that you provide your feedbac...

Void Check error
Our cash clerk voided a check that had already cleared. Check was cut in May, cleared in June and she voided it yesterday. Two things: 1. How was she able to void a cleared check? 2. How to correct? Thanks a million and a half! ------=_NextPart_0001_65CD624B Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello Peter, Thanks for using Newsgroups! Since the check is voided, you can reprint the check with the same check number by going to Cards | Financial | Checkbook and checking the "Duplicate Check" box, which will allow you to use the same check number for the...

Combo Box on Forms
Hi, I am using a combo box on a form that has several items w/ one being Other. If the user selects other I want them to be able to input what they want so that it will go into the table instead of just the "Other". I just am not really sure on how to do that. Can you help? Thanks, Jaime In design view click on VIEW - Properties and the the combo. Then change Limit To List to No. -- KARL DEWEY Build a little - Test a little "jseger22@yahoo.com" wrote: > Hi, > > I am using a combo box on a form that has several items w/ one being > Other. If the use...

Excel prob = Compile error cant find project or library
when i open excel 2002 on my xp pro pc it opens up with te error Compile error cant find project or library then takes me into the VB, the section it takes me to is talking bout setlanguagestrings? but when you close this screen excel works fine. any help please thanks in advance David Hi, Maybe an add-in with a programming error is bothering you. 1 Tools, Add-ins 2 note which are checked 3 uncheck all (but one) 4 restart XL 5 if no error, check the next one and repeat from step 4 Got the error? uncheck the one you last checked. Not an add-in? It will be a (hidden) workbook t...

sent box
how do i get the emails in the sent box to show sent to instead of sent from? -- deb deb wrote: > how do i get the emails in the sent box to show sent to instead of sent from? Add/remove whatever columns you want. Right-click on the header row and select Field Chooser. i may have not explained myself too well i dont want to sort by the "to" column i want the header on the email to show "to" not "from" i think the problem might be that this is not the default sent file, its just a folder named "sent" its for my boss, he ha...

Error while importing OFC statements
Hi, all. A message appears when I try to import a OFC file with statements from my bank :"C:\<money_dir>\20896.ofc cannot be imported. Please confirm you have the correct file, or select another file to import", while using MS Money 2006. The same process DID work for MS Money 2004, but do not seem to work with MSMNY 2006 anymore. I have already checked file extensions and .ofc files are already matched to MS Money Import Handler, just as OFX files are. Any help on this !? Manually importing and reconcilin would be just to manual work for me ... Thanks in advance. Bes...

Combo Boxes
Someone sent me an Excel document where each of the cells in I1:I312 are combo boxes. When you click off of those cells, the down arrow disappears. The list for the combo boxes are cells AA1 and AB1 (AA1 is New and AB1 is Existing). Please explain how this was done? Also, can you please tell me if it is possible to make New and Existing autocorrect entries. So even though the choices are New and Existing, if you hit N, New appears, and if you hit E, Existing appears. Thanks!! It sounds like Data|Validation. Take a look at Debra Dalgleish's site: http://www.contextures.com/xlDataVa...

Report Error
When I run any report I get this error Error: Subreport could not be shown. In the event log I get: Web service request SetParameters to Report Server https://server/reportserver failed with SoapException. Error: The path of the item '/mycompany_MSCRM/4.0/' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) --------------- Reports were working fine - the paths haven't changed so the above error is most likely not the real problem Thanks i...

Separator in combo box
hi, Is it possible to have a line separator in a combo box? I mean something like a separator in menus? thanks, Behzad Try :- http://www.codeproject.com/combobox/zsepcmb.asp http://www.codeproject.com/combobox/customcombo.asp -- Regards, Nish [VC++ MVP] http://www.voidnish.com /* MVP tips tricks and essays web site */ http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */ "behzad" <b@b.com> wrote in message news:%23fVB3em5EHA.3368@TK2MSFTNGP10.phx.gbl... > hi, > Is it possible to have a line separator in a combo box? I mean something > like...

Edit box should support languages like japanese,chineese etc
Hi wht im trying to ask is.. 1. In my application, all the labels r in english only. 2.If i change the content of one text box in japanese or chineese language , [Text box value is the title for another dialog] 4.After i changed the content, i want the title to be displayed in japanese or chineese language. Note: I want only that text box to be changed ,,not the entire application.. so How can i able to support multibyte characters in MFC controls CEdit --text boxes.. Plz reply They do. You have to be in a Unicode app, and you have to have selected a Unicode font that has Chin...

Text boxes on graphs
How do you make a text box hide the grid lines behind it on a graph? The grid lines are still visible and run through the text box, cluttering it up. Thanks right-click text box choose -- 'Format Text Box' from shortcut menu colors and lines tab change fill color to white Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day :) * Drew wrote: > How do you make a text box hide the grid lines behind it on a graph? The > grid line...

Accessing CRM website error
My CRM server has problem this morning, I cannot access to CRM website. Following is the error msg. I need to fix this ASAP. Please help me. --------------------------------------------------------------- Server Error in '/' Application. ________________________________________ Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Access is denied: 'Microsoft.Crm.Application.SafeHtm...

Multiple Combo Boxes Highlighted
Hi, I have a problem with something in VB6. I have 4 combo boxes with individual names (not an array) located on an SSTab object. When I select another tab and then return to the tab these boxes are located on, each of them appears to be highlighted in blue. I add values to them only when loading the form so I'm at a loss as to why this happens ? Any ideas are greatly appreciated. Thanks, Jen. "Jennifer Ward" <jward@comcast.net> wrote in message news:eq5HrcBrKHA.6064@TK2MSFTNGP02.phx.gbl... > Hi, > > I have a problem with someth...

HELP !! Combo box to feed other combo boxes
Hi, I have a form with a stock list. One field is [Dealer Allocated] so stock can be allocated to a specific dealer - this is a combo box (combo1) for single allocations. I now also want to be able to update this combo box for several records in bulk. I thought I would do this by having a second combo box in the footer of the form which the user selects the dealer from and then clicks a button which looks for first record without dealer allocated and updates the value of combo1 to the value of combo2. This would then be enclosed in a Do Loop for specified number of records. I can...

User Account SPN for CRM ASP.NET Application Pool account ERROR.
Hi there, I got this error message before the installation of CRM 4.0: "Verify Domain User account SPN for the Microsoft Dynamics CRM ASP.NET Application Pool account". Here's my scenario: I joined the Server to the domain I logged in using the domain admin "Administrator" account Installed everything and followed every step. But I got this message. How can I solve this problem? Please advice. Thank you. This would indicate that the SPN is missing on the account that is/will run the CRM application pool. You can find this account in the IIS manager under the ...

Set Text Box Control To Blank
I have a procedure that executes on the beforeupdate event of a textbox (text24). The procedure works out the checkdigit for the number entered and if there is a discrepancy, a message box appears telling the user the number is wrong. What I'd like to do is modify the code as such so that when a discrepancy is found and the user clicks ok on the message box, focus is returned to (text24) and set to blank so that the faulty number is gone. Here is the code I am using.... It's quite crude as I'm only at beginner level, but hey, it works! Private Sub Text24_BeforeUpdate(Cancel As Int...