Forms :: Make Listbox Visible After Selection Of Another Listbox

Oct 23, 2013

Okay then, after much trouble and confusion, I finally realized I need to use an Extended listbox in order to allow for multiple items to be selected from a list on my form (rather than the evil multiple selection combobox!).

However, now I am trying to figure out how to make one listbox (IndustryClassification) only be visible if the item "Industry" is selected in another listbox (TypeOfBusiness). Coding I can use for this in the AfterUpdate event of the listbox?

View Replies


ADVERTISEMENT

Forms :: Filter Queries By Listbox Selection?

May 31, 2013

I am currently working on a form for my users to look at budget data. I have several listboxes for them to filter queries by. What I was wondering is, if it is possible to have data in one list box be filtered by the preceeding listbox?

For example: Three list boxes: Report_Period, Budget, Dept.

Each list contains all the values possible. This data is all in a filter table (and the listboxes created using SELECT DISTINCT queries to that table for the specific field). So, if I select Budget XYZ, could I filter the Dept listbox to only show the dept.'s associated with that budget? These are all multi-select listboxes by the way, so budget ABC and XYZ would only show the departments associated as well.

View 8 Replies View Related

Forms :: Multiple Selection Listbox To Table

Jul 24, 2013

I have a form called "Record Call" when a user can input the calls that they have made or are scheduled. This form is based on the table "Call Records". I have created a new table called "CallAttendees" and added a listbox to my form for users to select who attended/participated in the call.

My code loops through the selections and writes these selections to the "CallAttendees" table. In this table i have an auto #, CallRecord, and Attendee fields. My code is supposed to write the "ID" field from the "Call Record" table to the "CallAttendees" table so that i can create the relationship between the two tables. However, this field is coming up blank since my form isn't generating the auto # until the record is closed.The tables are stored in a SQL server. I also tried saving the record prior to running my code.

View 5 Replies View Related

Forms :: Listbox Selection Based On A Table

Jul 18, 2014

I have a form with a listbox that allowed multiselection.

The listbox depends on the field "name"

And I have a table "names_should_be_selected" (fields: name, date ...)

It would be great if alle names in the listbox are selected when the name is in the table "names_should_be_selected".

View 3 Replies View Related

Forms :: Running A Query Based Upon A Listbox Selection?

May 1, 2015

I have a list box that is correctly listing resources from a table (tblResource). I would like to select one of the list box entry and run a query against the tblResource to show the information for that resource in a form. I have tried to use the lstindex with the control (lstResource) in the where clause of a query to accomplish this with no success.

View 5 Replies View Related

Forms :: How To Make Text In A Listbox To Flash Red

Mar 25, 2015

I'm working on a series of forms for a company that I'm currently employed at, and on one of them I've made a listbox which will display records which need action in the next 2 weeks.

That's all going fine. However, it it possible to make the items in the listbox flash red? Just so that our external worker REALLY has no excuses!

Just to clarify, I want the text identifying the records (E.g. Name, FinalDate) to flash, but not the headers for the columns in the listbox.

View 10 Replies View Related

Forms :: Make Listbox Autoselect If Only 1 Item

Sep 26, 2013

My form utilizes five list boxes. The user must choose from each of the five list boxes in order to filter out a specific product from a products table.Every time the user makes a selection, the next listbox is filtered, and set focus to. Each listbox often contains more than 1 choice within it, however, there are a few cases where there is only 1 choice to be made.

How can i determine with code when a particular listbox only has 1 choice so that I can have the choice be made automatically and then set the focus to the next listbox in the series?

View 2 Replies View Related

Forms :: Dynamic Row Source For Listbox From Multi-select Listbox

Jun 10, 2015

I am using the selections made of the form to generate a query for the user.

I have a CITIES listbox that is populated with values from a stored query.

I would like to make it multi-select and populate a LOCATIONS list box and a NAMES list box based upon the CITIES that are selected.

I have the locations currently populated from a stored query that reads the City selection from the Form. It looks like this

Code:

SELECT DISTINCT (t_location.LOCATION) AS Expr1
FROM t_location INNER JOIN t_asset_master ON t_location.LOCATION_PHY_ID = t_asset_master.LOCATION
WHERE (((t_location.CITY)=[Forms]![MasterQueryGenerator]![CityList]));

I also want multi-select so that is you can un-select all and get the results for all cities.

Here is my half thought approach.

Code:

Private Sub CityList_AfterUpdate()
'Dim LocQryStr As String
'Dim r As Integer
'Dim ctl9 As Control
'LocQryStr = "SELECT DISTINCT (t_location.LOCATION) " & _

[Code] ...

I intended to have the variable LocQryStr as the row source but I abandoned the idea of having multi-select when I saw that .Selected(I) never returned true. Its like the values aren't read in this subroutine.

View 5 Replies View Related

Forms :: Listbox To Show Types Based On Section In Other Listbox

Sep 9, 2013

I have a list box called "product list box" based on a query called "searchqry", i also have another listbox called "type list box" , how do i get the type list box to only show "types" based on the section in products list box?

View 1 Replies View Related

Forms :: Filter A Report Based On Listbox Selection - Apostrophe In Results

Feb 17, 2014

I use the follwing code to filter a report based on the listbox selection on a form. Below is the code I use, the problem it will error if the results have an apostrophe in the string.

Private Sub FilterDesc_Click()
Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant
'make sure a selection has been made
If Me.ListCarrier.ItemsSelected.Count = 0 Then
MsgBox "Must select at least 1 Carrier"

[Code] ....

View 7 Replies View Related

Forms :: Passing Listbox Rowsource To Another Form Listbox

Dec 14, 2014

Using a popup form

1. On my main form, I have a listbox, I would like to edit the values of the listbox.

To do this, I have a popup form with 2 listboxes, one to have the values of the listbox on the main form, and the other listbox with option values for the 1st

1) how to i pass the rowsource sql of the listbox on the main form to the listbox on the popup form

2) how on closing the popup form, do i update the rowsource sql listbox on the main form from the changed value of the popup form listbox rowsource sql

View 3 Replies View Related

General :: Using Combobox Selection In IF Statement To Make Another Text Box Visible

Aug 28, 2012

I have a combobox [CBreason] that reads from a table to show me why someone is gaining access to the building.

One of the options is "Incident".

When incident is selected I want a textbox [TBIncidentNo] and a button[BIncidentDup] control I made to appear.

I thought that the code:

If Me.CBReason.Value = "Incident" Then
Me.CBIncidentNo.Visible = True
Me.BIncidentDup.Visible = True
Else
Me.CBIncidentNo.Visible = False
Me.BIncidentDup.Visible = False
End If

Placed in the after update action of the CBReason box would sufice but it doesnt work

I'm guessing the value is not recognised fro some reason but i cant work out why. There is no error message or issus, it makes the box dissapear when there is no entry but no change for selecting incident.

View 3 Replies View Related

Forms :: Hide Unchecked Values In A Listbox - Create Hyperlink On Listbox Values?

Jan 20, 2014

Firstly, is it possible to hide unchecked values in a listbox? I have a user with several roles and I want to only show the ticked roles in the listbox.

Secondly, can you create a hyperlink on listbox values? i.e, if I click on "Manager" in the roles listbox, it follows that to another form and opens the record about managers?

View 10 Replies View Related

Confirming Selection From A Listbox

Aug 5, 2005

Hi there

This is what I'm trying to acheive and I'm sure its possible but cant quite get my head around it to do it.

I have a form with a multi select list box from which our customers can select a number of items they would like added to their worklist for the day. They then click on a command button which then sends those items to a table from which our employees then generates a worklist.

However what I would like is that once the customer has entered their selections I would like them to be able to click another command button before submitting the work to the table which would then show them the selections they have made before the info is submitted to the table. They would then review what they've selected and make additions or subtractions as neccessary.

I'm not sure whether or not I have to create two tables the first of which would hold their initial selections and then the first button would then run a query based on that first table and then once they click the submit button it sends that info to another table from which the days worklist can be drawn.

Another question is what if once they've reviewed what they've selected and wish to remove something? If selections go to a temporary table and then they unslected an item will that remove it from the table or would it create a new record which is not what I want.

If you could help that would be most aprreciated. I know very little in the way of coding so any explicit instructions would be most welcomed

regards

Steve

View 4 Replies View Related

ListBox Refreshing After Selection??

Oct 20, 2005

Hi All,

I have a Listbox [ListRandom], that populates a random selection of employees. The listbox is set to "Multiple Select = Simple" What I have now is: I can select several employees and then click a [print] button, this prints an individual form with those employees information, and then adds them to a table [tblselected]. What I am trying to accomplish is After those employees are selected, printed, and added, I then want to go back to the random list to select the other employees, but I would like the first ones that were selected/highlighted to refresh and be gone, so that I dont accidently add the same employee twice.

Is this possible?
And can someone point me in the right direction.
thanks....Enviva

View 3 Replies View Related

Multiple Selection In Listbox

Jul 28, 2006

Hi

In my application, I am allowing multiple selection in a listbox.
The data is saved in table. While retrieving, the items that were selected for saving, show as selected. But on printing ListIndex, it prints -1. What could be wrong ? I need to resolve it. Any solution ?

View 1 Replies View Related

ListBox Selection / Disable Fields

Aug 28, 2007

Hi, below is the codes that I use to produce a report based on user entry on a form. On the form is a listbox for the user to select the report they wish to view. On the same form, the user must enter the date. Depending on certain selections, some fields on the form are not required. How can I force the fields that are not required to become disable based on the selection from the listbox. Thanks

Private Sub cmdGetReport_Click()
Dim strRptName As String
strRptName = Me.lstReports.Value

Select Case strRptName

Case "Originations by Branch"

DoCmd.OpenReport "rptOrigByBranch", acViewPreview, , "ClosingDate Between #" & Me.txtStartDate.Value & "# AND #" & Me.txtEndDate.Value & "#"

Case "Loans Sent to Branch"

DoCmd.OpenReport "rptLoanSentBr", acViewPreview, , "Br = '" & Me.txtBranchNo.Value & "' AND ClosingDate Between #" & Me.txtStartDate.Value & "# AND #" & Me.txtEndDate.Value & "#"

End Select



End Sub

View 9 Replies View Related

Listbox Selection And Subforms Problems

Apr 11, 2005

Hello

I'm having trouble with with my form (frmViewCust). What I am attempting to do is create a form which shows a list of customers (from a query) and has a section with the customers details (from tblCustomers). I need it so when a certain customer from the list is selected, their details will be shown in the customer details section.

The best i could do was have the list and details as sub forms (fsubListCust an frmCustDetails). I made frmViewCust to show records from the same query as fsubListCust and create the textbox CustomerID. I successfully made it for when the CustomerID is shown, fsubCustDetails shows correctly corrisponding with the same CustomerID made. How can i make it so when a record is selected from fsubListCust, the subform will change to the same record for frmViewCust.

Alternativly I made it so the list was a list box instead of the sub form, however I still encouter the same problems. I can't make it so the record (shown in the navigational button) is changed to be the same as the record selected in the listbox.

Can anyone tell me what to do?

View 3 Replies View Related

NewBaby:Multiple Selection In ListBox!

Dec 15, 2005

I am designing a small database.
I have problem in selecting Mutiple list values from list box.

I have a table of Personal.With fields
SrNo ------------- autonumber
Name -------------- Text
Age ---------- Number
Interset ------------ (Text)
//In Interset Properties through lookup tag I have
Display Control -------ListBox
Row Source Type --------- Value List
Row Source ---------------- "Swimming","Football","Cricket",hockey"

When I made form I got all the List Box Items. For single Selection it has worked. But If I want Multiple selection. I changed the property List Box property Multi Select from "None" to Simple. Now It worked with Multiple Selection.But If one first record I select Swimming, Football.On second record it would be blank. And select my self. But the previous one is saved on all the next records.If two selction on first next all same selction with 2.
If three then three.

I want Individual selection. It must be saved.According to corresponding record.

Facillitate in this regard is much appreciated.

View 6 Replies View Related

Display Fields After Listbox Selection

Oct 22, 2014

I have been working on this problem for 3 days, and can't figure out what to do. I'm using Access 2010.

I have two tables. Tier1 and Tier2.

Table: Tier1 has Tier1ID (autonumber) and Tier1Desc

Table: Tier2 has
-Tier2id (autonumber)
-Tier1ID (which is the link back to the Tier1 table),
-Tier2Num -- this number shows which tier2 records are associated with each other
- and about 6 fields with descriptive info, 2 of which are memo fields

I have a form that has 2 listboxes:

- Listbox 1 has the row source to Tier1 table, control source Tier1ID
- Listbox 2 is an unbound listbox with the row source to a query.

The query is all the fields from Tier2 with the criteria where Tier1ID in Tier2 table = Tier1ID in Tier1 table

This all works. When I select something from the Tier1 ListBox, it displays the associated tier2 items for the tier1 selection.

What I need : When the selection is made in the 2nd listbox, I need the other 6 fields in tier2 table to be displayed based on the "Tier2Num". The listbox does return Tier2Num correctly.

I just need to display all the rest of the fields.

- I tried a popup form based on a query, but can't seem to pass the tier2Num to a form. (The query works if you enter the Tier2Num, which is the
[listitem] selection)
- I tried dlookup in a textbox
- I tried to add all the fields into the listbox, but could only get 3 to display (then I was going to do textboxes with the control(#) in it.

View 7 Replies View Related

Recall Selected Items From Listbox Selection

Oct 24, 2005

Hi all, greate site and i have been able to solve most problems by using the search box although this problem is doing my head in...!!

I have a db that records project numbers and their details. I am using a listbox to allow a user to multiselect Project Involvements Tasks(ie Documentation, Build etc) against a project number.

I am able to read the selections into a separtate table with two columns which is structured as:

ProjectNo - InvolvementType
123 - Testing
123 - Build
123 - Documentation
456 - Build
789 - Testing
789 - Documentation

as you can see I dont have a problem getting the Itemsselected into a table... the problem that i am having is getting them out again when the record is displayed - ie marking them as itemsselected.

I believe that the event would be onCurrent which would loop through this table pick up the project number and recorded invovements and mark them as selected in the listbox. if there is no invovement then the listbox would show no selections.

I am using this code to read the selections in

===========================
'Records project involvements against project
Public Function AddInvolvements(ctlRef As ListBox) As String
On Error GoTo Err_AddInvolvements_Click

Dim i As Variant
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim qd As DAO.QueryDef
Dim strDelete As String

Set dbs = CurrentDb
Set qd = dbs.QueryDefs!qInvolvement
Set rs = qd.OpenRecordset

'Delete records where project number exists against an invovelment incase of involvement changes
strDelete = "Delete Project_Involvement.ProjectNo " & _
"FROM Project_Involvement " & _
"WHERE (((Project_Involvement.ProjectNo)=[Forms]![Add_Project_Details]![ProjectNo]));"

DoCmd.SetWarnings False
DoCmd.RunSQL strDelete
DoCmd.SetWarnings True

For Each i In ctlRef.ItemsSelected
rs.AddNew
rs!InvolvementType = ctlRef.ItemData(i)
rs!ProjectNo = Me.ProjectNo.Value
rs.Update
Next i
Set rs = Nothing
Set qd = Nothing

Exit_AddInvolvements_Click:
Exit Function

Err_AddInvolvements_Click:
Select Case Err.Number
Case 3022 'ignore duplicate keys
Resume Next
Case Else
MsgBox Err.Number & "-" & Err.Description
Resume Exit_AddInvolvements_Click
End Select

End Function
===================================

Any help would be much appreciated - also thanks to Pat Hartman for his excellent examples esp http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=54924

Regards
Robert

View 3 Replies View Related

Combo Box Selection Displays Results In Listbox

Jun 6, 2005

How do I get my combo box selection to display related results in a list box?
I have a many to many table structure for a contact list that relates many contacts to many costcenters. What I want is when the user selects a costcenter from the combobox the related contacts show in a list box.

Thanks,

View 4 Replies View Related

Help In Insert/update Multiple Selection From A Listbox

Aug 7, 2005

thank you in advance for all your BIG help. :)

I have 3 tables - SMaster, SI_map, ILookup

I need to create a form to Add/Update into SMaster and SI_map tables, which has one-to-many relationship, that's why I use a list box to show the values from SI_map.

in SMaster [ Sid, other fields ]
in SI_map [ primary key, Sid, ILookupid ]
in ILookup [ ILookupid, IName ]

questions:
1. How to get the multi-selected values from the list box?
2. insert these multiple records into SI_map table at the same time with SMaster (if I use the same form to populate all these fields)
3. how to populate the records into form for user to see and update the values?

Any suggestion is appreciated, it is very flexible to change any format such as SMaster and SI_map can be separate forms, as long as it works.

Thank you.

View 3 Replies View Related

Open New Form Based On Listbox Selection

Oct 25, 2005

I have a form which has a listbox listing all the letters a student has had sent home. Basically i want to be able to click on a letter in the list box and for a popup form to open with the record details. However it just brings up a blank record.

The list box has a unique field called standardletterID.

the code behind the button to filter was just used through the wizard to open the popup form is:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmstandardletterspopup"

stLinkCriteria = "[StandardLetterID]=" & Me![List0]
DoCmd.OpenForm stDocName, , , stLinkCriteria

but it doesnt seem to be working :(

I thought this would be easy but no matter how much i destroy my database trying to do it its not playing ball!

View 1 Replies View Related

Open Form/record With Listbox Selection

Sep 26, 2006

Hi,

Need help on a list box issue. Solution is probably real simple, just can't see it with my bleary eyes.

I have a form (INSTLKP) with only a list box (List6) based on a table ((tblPersData) with fields PersdataID; SSN; Last; First; MI) on it. When I open the form up, the listbox does display all records associated withthe table. I would like to doubleclick on a desired SSN in the list box and have that record open up in a form (Perssub1) in edit mode.

And that is where the rub is... I have the following code in the On doubleclick event of List6


Private Sub List6_DblClick(Cancel As Integer)

DoCmd.OpenForm "Perssub1", , , "[PersDataID]= " & Me.List6, , acWindowNormal

End Sub


All it does it just open a blank Perssub1 form. Any ideas on what I'm missing?

:confused: Hawg1

View 6 Replies View Related

Modules & VBA :: Populating A Table Based On ListBox Selection

May 27, 2014

I have a form with a Listbox which lists Customers and a variety of customer information

I also have a table on the form that lists the donations that customers have made.

How can I populate the Table based on the customer that is selected in the Listbox?

There is an ID field that links Customers with Donations

I'm guessing I need some code in the ListBox_CLick() event that triggers the table to query or to Load with a query based on the ListBox.Column(0) which contains the ID?

View 2 Replies View Related







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