Conditional Lookup /Combo Box Filter

Mar 16, 2006

TblCat Contains fields CatID (index) & CatText (Text)
TblType Contains field TypeID (index) , CatID (index) , and TypeText (Text)
Relationship of tbleCat.CatID (one) to tblType.CatID (many)

Forms!Input!cboCat bound to Tables!Inventory!Category
Forms!Input!cboType bound to Tables!Inventory!Type

Intent: Choice from cboCat to provide from list for entry into Inventory.Catagory plus filter list choices for cboType for entry into Inventory.Type.

cboCat :
RowSource : SELECT [tblCat].[CatText], [tblCat].[CatID] FROM tblCat;
Event:
Private Sub cboCat_AfterUpdate()
Dim xxx As String

xxx = "SELECT [tblType].[TypeID], [tblType].[CatID], [tblType].[TypeText] " & _
"FROM tblType " & _
"WHERE [CatID] = " & Me.cboCat.Value
Me.cboType.RowSource = xxx
Me.cboType.Requery
End Sub
cboType: No special RowSource or events

cboCat works fine but cboType has a popup box that asks for the Parameter value for the choice made in cboCat. ( Me.cboCat.Value ???) Where did I go wrong ??

View Replies


ADVERTISEMENT

Forms :: Conditional Formatting On A Lookup Field List

Mar 5, 2014

My table fields are as follows:

1. Issued? (This is a lookup field with the following lists "Yes"; "No"; "NA")
2. IssueDate

I created a subform bound to the table.I wish to accomplish the following on the form:

1. If "No" is selected on the [Issued?] field, I want the [IssueDate] to gray out.
2. If "Yes" is selected, I want [IssueDate] to be required.

I set Conditional Formatting as follows:

Expression is ([Issued?]="No"), condition is disabled.

When I tested it, [IssueDate] grayed out when "No" was selected. However, when I select "Yes", it still remained grayed out.

View 5 Replies View Related

Lookup Tables And Filter Results

Jan 12, 2012

I've created a table (Films). One of the fields is linked to another table (People). The table 'People' is a list of people with a categorization next to them (e.g. actor, director etc)

Is there a way that I can create a field called 'Actors' in the table 'Films' and for the drop down only to display those people who have been categorized as an actor?

View 1 Replies View Related

Cascading Combo Box With Conditional Msgbox

Jan 20, 2006

I am using the below sub to create a cascading combo box, which works fine.

However, not every subject in tblsubjects has a subcategory, so I want a msgbox to appear only when there are subcategories to choose from. At the moment I am using
If Me![Subject2] = "Dispute Resolution" Or [Subject2] = "Employment" Then Msgbox "text"
but this will mean changing the code everytime new subjects with subcategories are added. Can anyone help please?

Thanks!
Alison

Private Sub Subject1_AfterUpdate()
On Error Resume Next
Subcategory1.RowSource = "Select tblsubjects.Subcategory " & _
"FROM tblsubjects " & _
"WHERE tblsubjects.Subject = '" & Subject1.Value & "' " & _
"ORDER BY tblsubjects.Subcategory;"
End Sub

View 14 Replies View Related

Conditional Formatting Using Combo Box Selection

Sep 16, 2015

I want to setup conditional formatting that will turn the box green or red. The problem is that the values need to change depending on a combo drop box value. Is there an expression I can use to tell it to look at the combo box then use a certain value depending on the combo box?

View 5 Replies View Related

Conditional Visability Based On Combo Box Selection

Dec 22, 2006

I'm not new to object oriented programming but I am new to Access. I have found some questions similar to mine in search but I need more explanation if someone wouldn't mind.

In my form, I have a combo box that looks up 3 values from another table. Among other controls, I have a few text boxes that I only want visible if 1 of the 3 possible combo box options are selected.

I understand that the code for this should probably be placed in the "events" of the of the combo box...which one? I understand the logic but what would the code look like? Do I use the expression builder?

Thanks for any help on this.

View 1 Replies View Related

Problems Using A Combo Box To Filter Records In Another Combo Or A Sub-form

Nov 8, 2004

I have seen a few articles here and there on using a combo box to filter records in a sub-form and to filter records in another combo box, but I am not getting anywhere. I hope someone can belp

Exercise 1

For this exercise, I have the following tables:

tblClients containing client names
tblProjects containing some project details

I want to set up a simple form, so that the user can select a client name from a combo box on the main form which filters the project detail records in the Projects sub-form.
Once the user enters project details, I want this info as well as the selected ClientID to be fed back to tblProjects.


Exercise 2

I have the following tables:

tblProjects as above
tblWorkstream containiig names of workstreams and some other details.

Every project has one or more workstreams

I have a form where users will enter hours worked on each workstream. They will first select Project from a combo box on the main form. This should then filter records to be displayed in the Workstream Combo box, before they can then enter hours.



Please let me know if you need me to explain any part of this better.

Thanks in advance.

ps. I am a novice, so I'm hoping to do the above using default MS stuff, not with complex programming!!!

Thanks

View 14 Replies View Related

Forms :: How To Filter Combo 2 From Table After Select Value From Combo 1

Nov 5, 2013

i have a table with three column Named

1-State
2-City
3-Customer

on a form i m placing 3 combo box for each column how can i filter combo 2 from table after select value from combo 1

View 1 Replies View Related

Queries :: Conditional Query To Post Result In Field And Filter Result Records?

Mar 5, 2014

I am working with Access 2010, on vista. What I have is a query made up of two tables, one product the other inventory. (see below) query.jpg

In the product table i have a field called "minimum reorder level". In the inventory table i have two fields one called "number in stock" and "number on order". What i want to happen is "number on order" to be filtered by the result, if the "number in stock", is less than "minimum reorder level", if it is, have the result placed in the "number on order" field. EG. if the "number in stock" = 2 and the "minimum reorder level" = 5 then 3 would be placed in the field "number on order" and only the second record from the query would be visible (see below) Query result.jpg The result of this would mean that the field "number on order" would be populated with the result and the and query would also use this to filter the record.

View 1 Replies View Related

Forms :: Conditional Formatting - Combo Box To Highlight If Value Is Not On The List

Feb 23, 2015

I want to add a conditional formatting to a combo box to highlight if the value is not on the list.There is a process to read in data from a 3rd party excel sheet that has truck arrival dates and times. My form displays this data and allows the internal users to change it. My form has the "Trucks" field as a limit to list combo box - so basically any data can be read into this field but internal we can only change it to trucks on the list (from the trucks table). I want to highlight where the trucks value is not in our trucks list.

View 2 Replies View Related

Combo Box Lookup

Mar 8, 2005

I have a form with a combo box (unbound) that gets its values from a table.
I also have another combo box which is supposed to get its values from a query:

SELECT Vehicle.Registration, Vehicle.Make FROM Vehicle WHERE (((Vehicle.Customer)=Forms![New Job]!Customer));

I have made the first combo box refresh/requery the second one onChange, but I get no options in the combo box.

I am pretty sure that the first combo box is Forms![New Job]!Customer. and there are matching values in the Vehicle.Customer field.

The database can be downloaded from:
http://www.tapestriesdirect.com/Garage.mdb (996KB)
or if you can unzip (who can't?!?)
http://www.tapestriesdirect.com/Garage.zip (86.1KB)

Cheers for any help

Graeme

View 2 Replies View Related

Forms :: Setting Up A Combo Box To Filter Another Combo Box

Jan 27, 2015

I'm having a little difficulty setting up a combo box to filter another combo box. I've actually got one working but the second one is giving me all sorts of errors. On the attached database, there's a form called frmAddNewRecord. At the top of the form there's a combo box which allows you to select a name and another combo box beside it which acts as a filter so only names from a certain section are shown (working fine).

The subform which is attached to this form and contains the training details, has another combo box which allows you to select a job...I've tried to add a combo box beside this to filter it but I can't get it to work.

View 5 Replies View Related

Lookup Using Combo And Text Box

Mar 29, 2005

Hey guys

This is the problem,

I have 2 fields in a table. Cityand Country.

City Country

paris.......France
madrid....Spain
london....England
milan.....Italy
Rome.....Italy
ETC

Field "City" is connected to a combo box and field "country" to a textbox on the form.

I would like the user to select a city from the combo box. When this is done the textbox linked to the country field should automatically update to show the correct country. This should update without user intervention.

I would find it better to have the text box look up a value list rather than use a table for its source. the form is being used as data entry. The combobox linked to field "city" is also a value list.

Thanks in advance.
Nitesh

View 5 Replies View Related

Uppercase In Lookup Combo Box

Aug 5, 2005

I would like all of the text in my database to appear in upper case. I used the > symbol in the format of all controls and in my tables also. However, on my form's lookup combos it doesn't work. When I click the dropdown it shows all selections in upper case, but after I select it turns into lower case again.

I then tried using Ucase and strConv but those don't seem to work with my combos either.

I have searched and these are all the suggestions I could find on how to do this, does anyone know another or possibly what I am doing wrong?

View 2 Replies View Related

Combo Box Lookup And Permissions?

Feb 27, 2006

Hiya

Have just created an access 2000 database which when a user logs on to the network as herself and tries to lookup any combo boxes or click a button to run a query from a form it shows or does nothing, yet when I log on I can.

Our IT Services have looked at folder/share permissions which appear to be OK and I've not set any permissions/workgroups in the database.

Can anyone shed any light as to why this is happening please?

Thanks
Dawn

View 2 Replies View Related

Combo Box Items In A Lookup Query

Jul 18, 2007

I have a Combo Box based on a table list on a Form. I want to choose several items from the list to feed a Lookup Query. Can this be done? :rolleyes:

View 1 Replies View Related

Combo Box Subform 'Reverse Lookup?'

Jun 9, 2006

I have two tables A and B. There is a 1 to many relationship between A and B. Table A's data is controlled by FormA, Table B's data is controlled by FormB which is a subform on FormA. I already have a combo box for navigation on FormA, however I would also like to be able to have a combo box on FormB (FormA's subform) for navigation, so that when I choose an record from the subforms (FormB) combo box, FormA then jumps to the 1 record from FormA that contains the related record choosen in the SubFormB's combo box (along with the subforms choosen record on the subform) .

Kindalike the combo box on FormA, except it's a 'reverse lookup' if that makes sense. Is this at all possible, does this even make sense? :confused:

_______________
HOLY CRAP BATMAN!!!

View 2 Replies View Related

Combo Box To Lookup Values In A Table

Nov 16, 2006

I have a small database with 3 tables.
tblBilltoCustomer
Fields - Key - BillCustID , companyname, address1, address2, city, state

tblOrders

tblCustomers

I have a form that has tblCustomers as the main form then tblOrders as a sub form.

I want to place a combo box on the form that will lookup a company name from the tblBilltoCustomer table then brin in the address1, address2, city,state , into the form for that record. But then I need that same info to print on a rpt.

I can get the lookup to work using =cboCompanyName.Column() but the addresses , city and state will not show on report
Is there any good samples of lookup fields

Any Ideas are greatly appreciated

Dean

View 6 Replies View Related

Queries :: Filtered Lookup In Combo Box?

Jan 28, 2014

Where MS Excel is concerned there is very little I can't do and I am now transferring that skill to MS Access and I'm stumbling on this one.

In Excel I would use the INDIRECT formula within the validation and named range to do this but in Access I'm struggling to get this to work.

I have in table TBL_NL_Structure a list of CLIENT_ID with NL_ACCOUNTS against them i.e.

CLIENT_ID....ACCOUNTS
900001.........4000
900001.........4001
900002.........4003

What I want to be able to do is in a sub form and a combo box named ACCOUNT that looks at the active CLIENT_ID and pulls into to combo box JUST the ACCOUNTS set to that CLIENT_ID example if the CLIENT_ID is 900001 is just brings in ACCOUNTS 4000 & 4001.

I can get the whole list to come in to the combo box but not a filtered list.

View 3 Replies View Related

Combo Box Not Growing With Lookup Table

Oct 10, 2011

I have a DB that that is growing slowly. To keep it simple I have 2 tables and one form. One of the tables is a “ASSET_lookup” table. The other table (ASSETS) is the real meat and potatoes. I have a form for the assets table that will populate specific fields that are looked up based on a single combo box linked to a query from the assets_lookup table. Everything worked fine until I needed to add some additional items to the asset_lookup table.

The new “records” I added to the lookup table will not show up in the combo box after it updates (a selection is made). I did some experimenting and if I recreate after adding the new records to look up table, the combo box will show the value, but I am curious what I am missing.

View 5 Replies View Related

Combo Box Lookup Field Blank

Sep 30, 2015

I have a main form which has a button to View one of the Reports related to my primary table.The View Report works fine.On close of the Report the program returns to the Main form, and it returns to the record of the Report that was viewed with all of the data for that record showing in all of the Fields, except the Combo Box that I use to look up a record, it is blank.Other than that, the Look Up Combo Box works fine.How do I get the Look Up Combo Box to show the information for that look up field.In the On Close item for the Report I have the following code to get back to the record I want to return to.

Private Sub Report_Close()
DoCmd.OpenForm "ENLARGED PROP INFO", , , "[Name]='" & Me![Name] & "'"
End Sub

View 6 Replies View Related

Combo Shows 0 For Value List Lookup On New Record

Jun 6, 2005

I have a table with some combo selections with row source No;Yes, bound column 1, column count 1, and default value "No", limit to list set to yes, required = yes, allow zero length = no.

When I create a new record though, all of the combos show 0, and I have to select No or Yes manually. The requirement is that No is the default value..

Lots of thanks in advance,

Aidan

View 5 Replies View Related

Forms :: Lookup Table To Populate Combo Box?

Sep 2, 2014

I'm using a lookup table to populated a combo box on my form. I use a provided list of input strings (hundreds) in my combo box and the list is provided in all caps. How can I convert these provided words (strings) to first cap from either the quarry level or form level.

View 1 Replies View Related

Forms :: Combo Box Within Subform That Use Lookup Queries

Jun 18, 2014

I have two combo boxes in a subform that use lookup queries. I can get the combo boxes to work correctly out of sub form in a regular form but can not get the combo boxes to work in the sub form. I have narrowed the issue to the logic in the queries in the secondary and tertiary combo box queries. Here is the part of the secondary query. I think I have to add the primary form name to this part to correct my issues. How would I do that?

primary form = Lookup_fm
sub form = master_tbl_sub_fm

IIf(IsNull([forms]![Master_tbl_sub_fm]![Role1]),[P_ID],[Forms]![Master_tbl_sub_fm]![Role1])

View 1 Replies View Related

Tables :: Joined Two Tables - Unable To Filter / Lookup On Second Table?

Feb 18, 2013

I have an Access Table with about 28,000 Automobile dealerships across the country shown. I've joined a new/small phone contact table to this to keep up with our phone contacts with the dealership and followup efforts. When I search/filter on the dealership table all is fine. However when I search/filter on the phone contact table with a few test entries, I get nothing at all. I supposed that after joining the tables, I'd be able to do a search on the field named follow up date and find/filter today's date or other dates and locate which dealerships to contact when the correct date arrives. But nothing.

View 14 Replies View Related

College Student Needing Help With Lookup Combo Boxes

Mar 9, 2006

Hello people,

I'm not a programmer, I am infact a 17 year old College Student from the United Kingdom - Studying ICT!

For my major project I have to design, build and test a camera loans system for my photography department. Except, I am having problems with Combo box lookups. It's been over 6 months since I learnt this, and it's all a blank. Something as simple as this is simply not working...

e.g. in the Studentloans table, I wish to enter the Student ID number from the student ID card inside the combo box, and hit enter so that it brings up the relevant specific loans of that student.
I enter the id, hit enter and the student name, class etc does not change. Why? The same goes for my Camera Maintenance Table, Camera + Maintenance tables are combined to a CAMERAMAINTENANCE TABLE - Therefore I wish to enter the Camera ID number so that if i hit enter, it brings up the relevant service histories of that specific camera...

The relationships are all ok, the fields for Student ID are lookup, etc.

I don't understand. It's driving me insane. I need help with this, I'm struggling so much.

Help much appreciated.

Thanks - Neil.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved