Access combo box control by another data field

Hi,
I use a combo box in a form with look-up from a table for selecting data. 
Easy enough.

But, I want to only see a selection of the data in the table, depending on a 
value in another field in the form.
I the combo box table I have ID, data1, and data.
data1 is the one that shall be equal to the other field.

1, 1, text1
2, 1, text2
3, 2, texta
4, 2, textb
5, 2, textc
etc.


I have tried using the standard query that comes with the combo box, and 
then adding a WHERE statement testing against the data fiel in the form, but 
it does not work.

Any suggestions anyone?


0
Utf
3/8/2007 8:39:07 AM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
2170 Views

Similar Articles

[PageSpeed] 13

Check this link on "How can I filter one Microsoft Access combobox based on 
another combobox selection"

http://www.databasedev.co.uk/filter_combo_boxes.html

===================================
Another way, which I rather because there less code involved

Create a reference in the combo RowSource to the field in the form

Select ID, data1, data From TableName Where data1 = 
Forms![FormName]![TextBoxName]

On the after update event of the text box, you need to run the code
Me.[Combo name].Requery

-- 
Good Luck
BS"D


"AEL" wrote:

> Hi,
> I use a combo box in a form with look-up from a table for selecting data. 
> Easy enough.
> 
> But, I want to only see a selection of the data in the table, depending on a 
> value in another field in the form.
> I the combo box table I have ID, data1, and data.
> data1 is the one that shall be equal to the other field.
> 
> 1, 1, text1
> 2, 1, text2
> 3, 2, texta
> 4, 2, textb
> 5, 2, textc
> etc.
> 
> 
> I have tried using the standard query that comes with the combo box, and 
> then adding a WHERE statement testing against the data fiel in the form, but 
> it does not work.
> 
> Any suggestions anyone?
> 
> 
0
Utf
3/8/2007 10:12:38 AM
Reply:

Similar Artilces:

Choosing subform fields from master form
Hello - I have a master form with 4 subforms. 3 of the subforms have only checkboxes. The boss wants to choose the checkboxes displayed in subforms. For example, this week the boss wants users to view checkbox1, checkbox2, checkbox5, and checkbox7 in a subform. The following week he wants users to see checkbox3, checkbox4, checkbox6, and checkbox 8. I'd like the boss to have an administrator console where he chooses what checkboxes will be available for the users.How do I handle this with a multiuser split database? Any ideas? Thanks! Steve -- Message posted via AccessMonster.com htt...

Restricting access to note attachments
Hi all, is there a way to restrict access to attachments on notes to specified users. I know we can, using the Security Roles, define who can and can't read/ write the notes fields but we would like our users to be able to view the note, but not open the attachment(s) unless they are the owner of that note (or at least in the business unit, etc.). I know this could be done for Word/ Excel files in Office (Password protection) but are looking for something more encompassing for all attachments inside CRM. Thanks, -- Matt Pring On Oct 21, 3:54=A0pm, Matt Pring <MattPr...@discus...

Outlook Web Access AutoSignature
I would like to know if it's possible to have autosignature in Outlook Web Access, and if so how to implement it. If anyone can help, it would be greatly apreciated. Thank You. It depends on the version of Exchange - Outlook Web Access is a function of Exchange, not Outlook. Exchange 2003 does this natively, previous versions may have a third party add-in that will allow users to do this. For better information, post in an exchange group such as microsoft.public.exchange.admin. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due t...

Access 2003 and Access 2007 Synchronization
I'm setting up a new business relationship with a company in Portugal. They use Access 2003. I have just bought MS Office Professional 2007 (with Access 2007). Our plan is that they will send, once a month or so, their Access db then we will update and add to that db and then return it after another month or so. There probably won't be a lot of updates on our end so the monthly cycle should work. After they synchronize, they will send a new version of the db and we will start over. My goal is to keep everything as simple as possible partially because I don't know how skillf...

Excel Row to Access Columns
Hi, I have a single row in Excel with a lot of data, what I need to do is move that to a column in Access. I need some way to automate that. I know the easiest way to do that would to just transpose it in excel and then import in access.But I cant do that as I just get that excel file with one row and I need some way to automate the process in Access. thanks m -- mk389 ------------------------------------------------------------------------ mk389's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15272 View this thread: http://www.excelforum.com/showthread.php?...

Including Ship To Address 'User Defined' fields on SOP Invoice.
How do I include the Ship To 'User defined 1 and 2 fields' on an Invoice? The ship to is defined on the customer maintenance card and differs from the Select Address Code for the customer ('PRIMARY' vs. 'SHPTO'). I can retrieve the Ship To Address line 1 thru 3 using the RW_AddressLine1 .... RW_AddressLine3 functions. However I can not determine how to retrieve other data maintained under this Address ID from the Customer Address Table. How do I achieve this? That's because the User Defined fields you are looking for are in the Customer Master Address tab...

Help displaying a random record in a form--Access newbie
Hello, I am new to Access, so if anyone can help me, please assume I know absolutely nothing! I currently have a table with two columns, ID and CHORE. In each row, the ID number corresponds to a chore that I have entered. I would like to create a form with a button and a text field such that when I press the button, a random chore is displayed in the text field (supposed to make chores more "fun" for my son). There is no need to remove this record from future clicks (the same record can come up over and over without any problem for me) Can anyone explain to me (in pai...

Access
Hi My form takes a few moments to load up as it is fairly substantial SQL statement is there a way to get something to display a graphic or 'loading...' message to appear why it calculate the contents? Steve ...

access mail on WEB
Is there a way i can check emails from exchanger server 5.5 from an internet browser. I have Exchange 5.5 in win NT 4.0. Thanks! Yes - install OWA (Outlook Web Access) and open up the needed ports in your firewall (80 for http; better to use SSL and port 443 instead). disk0nek wrote: > Is there a way i can check emails from exchanger server > 5.5 from an internet browser. > > I have Exchange 5.5 in win NT 4.0. > > Thanks! ...

Smartlist
Hi I created several smartlist, but the search using the "any" field does not return any results. IT appears to search and but returns nothing. I have using the Integration guide and the only reference to the any field is setting the data type in the Explorer_Get_Datatype script. Is there something I am missing? Do I need to add more code? Is there a data entry I need to delete? Any suggestions? Jason, Tested this on v10 SP3 and I get no results either. It seems to be a bug. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumg...

access or mount mirrored hard disks
Hi, is it possible to access a mirrored harddrive? or mount the mirrored volume by using api or mfc commands? Thank you in advance Wimpi ...

CRM v4 Accessibility Improvements
Hi all: Does anyone know if any improvements have been med to CRM v4 in the area of accessibility for handicapped users? One of my customers has a user who is blind and they need to make the software accessible to him. Thanks in advance for any and all help. John. Hi John, We have added following Accessibility features in CRM 4.0 : 1) High Contrast Mode (Tools --> Options --> General Tab --> Enable high contrast settings) 2) All the Form input elements have <LABEL FOR> to aid in screen readers. 3) All the Images have a ALT tag (for non text elements) etc. Thanks! Ma...

Access Database In Great Plains
I was wondering if anyone knew how to have the databases that are stored in access transfered over to great plains. I'm current running version 8.0 any help would be greatful. thanks Search Customer Source for integration Manager. MS Access databases can be used as a data source. Vincev "jake" wrote: > I was wondering if anyone knew how to have the databases that are > stored in access transfered over to great plains. I'm current running > version 8.0 any help would be greatful. thanks > > Hi Jake, Is this something you need to do regularly or is it ...

can you make one worksheet update another
I have two similar worksheets within the same workbook. One sheet is sorted by name and the other sheet is sorted by a date for a speicfic name. Is there a way to change the date on the sheet, sorted by name, and that will automatically find the name on the other sheet(sorted by date) and change the date to the second sheet? Jaime, The normal way is to have one table, and sort it as needed when needed. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Jaime S." <Jaime S.@discussions.microsoft.com> wrote in mess...

Upsizing Access to SQL Server 2000
Hello, I am new to SQL Server. I am trying to use the Database upsizing wizard to upsize a Access 2000 database into SQL Server 2000. They are both on the same machine (running Win 03 Server). I cannot connect to the SQL Server. Error as below: Connection failed: SQLState: '01000' SQL Server Error: 14 [Microsoft][ODBC SQL Server Driver][Shared Memory] ConnectionOpen(Invalid Instance()). SQLState: '08001' SQL Server Error: 14 [Microsoft][ODBC SQL Server Driver][Shared Memory]Invalid connection. ...

Link in Text box
I have text box links to data in the worksheet in 2003. When I open the file in 2007 the links do not update. How can I get 2007 to automatically update the text boxes without reestablishing the links? ...

Hide Rows in one W/S Based on a cell value in Another W/S
Hide Rows in one W/S Based on a cell value in Another W/S I have the following code in an excel spreadsheet (see below). The code correctly hides the rows when C98 in one worksheet = "Dog" but when C98 does not = "Dog" it does not unhide the cells on Sheet Blue. Why? Select Case UCase(Range("C98").Value) Case "Dog" Sheets("Blue").Rows("94:113").EntireRow.Hidden = False Case Else Sheets("Blue").Rows("94:113").EntireRow.Hidden = True End Select Maybe your have your true/false mixed up -- Don Guillett SalesAid ...

Outlook Web Access #19
We have have OWA at my work and I would like to configure Outlook 2003 to synchronize with my desktop at work, is this possible Thanks B ...

Missing values from a pivot table field
I am creating a pivot table from an access database containing 896426 records. The issue I am running into is that on one of the fields the pivot table is only pulling in one of two values, but the access table does contain the second value. When I click on the arrow associated with that field it does not contain the second value either. Is there somewhere else in the settings this value could have been lost? Perhaps try Drag the field off the table Refresh the table Drag the field back on. With pivot tables you need to let us know which XL version you have. pivot ta...

Have a user account accessible to multiple users
I have an issue where there is a user account that has multiple alias emails.(reservations@domain.com, info@domain.com, CustomerService@domain.com) I have an exchange 2003 server. My issue is that i need to have muliple users access these emails so they are never missed. What is the best way to accomplish this? I was thinking a public folder. But i want to know the best way to do this? On Sat, 12 Jun 2010 21:37:04 -0500, "Dan V" <dvalenti54athotmail.com> wrote: >I have an issue where there is a user account that has multiple alias >emails.(reservati...

Queue Data to another thread
Hi, I have two threads thread1 and thread2. Thread1 will give queue some data so that Thread2 will process the queued data. What mechanisms are available in c# for doing this? Thanks! Maanu wrote: > Hi, > > I have two threads thread1 and thread2. Thread1 will give queue some data so > that Thread2 will process the queued data. > > What mechanisms are available in c# for doing this? There is nothing built-in per se. But, a basic implementation will make use of the System.Collections.Generic.Queue<T> class, the Monitor class, and the "lo...

Going offline without write access to registry
I suggest that POS doesn't go offline if it can't write into registry, displaying a message box instead telling that it couldn't access the registry. What happens if the POS machine goes offline without having access to edit the registry? This typically happen when the user is a normal user (not a power user) 1. The POS application will try to connect to the server main database within the pre-configured ‘Connect Timeout’ in the RMS Administrator (Typically 15 seconds) 2. The application will then try to connect to the pre-defined offline database (which is usually stored loc...

Access 2000 problem if opened with Access 2007
Dear all, I'm running Access 2000 MDE in Access 2007. I find several header-details form (such as invoice transaction), the details form is displayed as white box without any record displayed. Is there any solution for this matter ? Thanks. Chlaris. you need to move to Access Data Projects if you want a reliable, predictable environment "Chlaris" <chlarrissa_nospam@yahoo.com> wrote in message news:ON0rS1NsHHA.3884@TK2MSFTNGP04.phx.gbl... > Dear all, > > I'm running Access 2000 MDE in Access 2007. I find several header-details > form (such as inv...

Is there away to link something on one page to another?
Hello i was wondering if anyone could help me. Im doing a project for my NVQ4 course and before i can start i would like to know if there is anyway that using excel you can type one thing say on sheet 1 but link it so it comes on automacially on say sheet 4? Many thanks for all replies! Nickle 3 methods to choose from. 1. On sheet 4 select a cell and enter an = sign. Switch to sheet 1 and select the cell to link. Hit ENTER key. 2. In cell on sheet 4 enter =sheet1!cellref 3. Select a cell on sheet 1 and copy then switch to sheet 4 and select a cell then Paste Special>...

Delete all data (formulas) below a desired row.
In Excel 2000, I somehow propagated a formulab to over 60,000 rows. Is there a shortcut to clear a large unwanted area? In the name box (above row 1 left of column A), type in the the range you want to delete, assume you wanted 15 rows of formulas and want to delete row 16 row 65336, place cursor (mouse click) in the name box and type 16:65536 and press enter, then do edit>delete, press ctrl + home and save the workbook Regards, Peo Sjoblom "JMSimms" wrote: > In Excel 2000, I somehow propagated a formulab to over 60,000 rows. Is there > a shortcut to clear a l...