After changing the combo (RepSort), the listbox is blank. I have tried this with a table as source and as a query as source. Also with and without the requery.
If someone can spot what is wrong with the code, please fill me in!
I have two tables of information. One is a customer contact list, the second is a list of services currently assigned to the customer.
I am trying to create a setup that allowes me to find the customer name, probably in a table or querie, open up their contact information and have a listbox of all the services assigned to them at the bottem. I would then like to be able to open up one of these services in another form.
'm sure this is possible, but I'm having difficulty getting the listbox to update it's filter for each document. Specifically, as I click through to the next record, listbox does not seem to pull the new Customer ID #.
Here is a Row Source line I got online. It seems to pick the first CID no problem, but does not seem to update for the next one.
SELECT [Policies].[Client Number], [Policies].LAST, [Policies].FIRST, [Policies].MI FROM [Policies] WHERE ((([Policies].[Client Number])=Forms![CLIENT DATA2].[FF CLI #]));
If anybody could direct me to a good source of information on this, I'd appreciate it.
I have a form on which I use combo boxes to filter a listbox using the following code.
Private Sub FilterpartsList() Dim strRS As String ' Filter the list box appropriately based on the combo box selection(s) strRS = "SELECT partsquery.partname, partsquery.Heritage, partsquery.Description FROM partsquery" If Not IsNull(Me.cbomodelID) Then strRS = strRS & " WHERE modelID = " & Me.cbomodelID
So I have a Tab control. Each tab is assigned to a specific user (which is controlled through another form). So If I assigned Page1 to Smith then Page1 caption reads Smith. Within each page is a list box that is filtered based on what name is in the caption. This works perfectly. My problem is I have another list box that is not within the tab control. I wan this to be filtered based on what tab is active. Both list boxes are bound to a query.
I've filtered a listbox query between two dates selected by a user through an unbound text, however the listbox only changes after you click it. I've requeried it after someone updates the 2 unbound date textboxes, yet it still doesn't work.
I am using the Filtering a listbox method from this post [URL] .....
It works great apart from when i type too many characters and no search results can be found i get a run time error '2105' you cant go to the specific record.
I think it may be because my form has a row source. When the example uses an unbound from?
I found a code which is work good with subform table for searching multivalued Listbox but it doesn't work with open report vba code. This is the code is used for filtering the subform and i need it for openreport command
If Me.cboDiscipline > "" Then varWhere = varWhere & "[Discipline].value = '" & Me.cboDiscipline & "'" End If
This the code (note: its for open filtered report)
Private Sub Toggle3_Click() Dim strReport As String Dim strDateField As String Dim lngLen As Long Dim strWhere As String Dim lngView As Long Const conJetDate = "#mm/dd/yyyy#"
Hi, I'm new here, so I hope I'm posting this in the correct place. I've searched the forum to see if there are any existing threads that might help me, but I've not found anything that does... (I think this thread ( http://www.access-programmers.co.uk/forums/showthread.php?t=93444&highlight=Copying+data )may be trying to achieve something similar to me, but I'm a beginner and don't really understand it)
I shall stop waffling! I'm not entirely sure that what I'm trying to achieve is possible, I expect it probably is!
Right, I have a form (frmGroupRegister, which contains exactly the same fields as the table it comes from, tblGroupRegister), which consists of three things:
-GroupDate - The date a group took place on. It is my primary key, as no more than one group occurs on a specific date.
-ParentList (A listbox which contains a query showing the ID number, forename and surname of everyone in a table, tblParentDetails)
-ParentsAttending (A blank listbox)
I would like to place buttons in between the ParentList and ParentsAttending, which would allow users to conduct a 'register' of attendance by copying individual/multiple details from ParentList into ParentsAttending (much like you get when choosing which fields to include in a form when using a wizard for example). I would also like them to be able to remove people from ParentsAttending by using a button in case of accidentally adding the wrong person into the ParentsAttending box.
I'm aware that another, probably simpler way of achieving this would be to use a tick-box system, but I feel that visually, the first method would both look better and demonstrate who is present more clearly.
Any help would be much appreciated, but my Access skills are quite basic and things will probably need to be spelled out for me. I'm using Access 2000 and Windows XP. Thanks for your help, Alice :)
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.
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?
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
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?
I've got this multiple select listbox which writes data into a textbox:
Private Sub List2_AfterUpdate()
Dim Cursisten As String Dim ctl As Control Dim Itm As Variant
Set ctl = Me.List2
For Each Itm In ctl.ItemsSelected If Len(Cursisten) = 0 Then Cursisten = ctl.ItemData(Itm) Else Cursisten = Cursisten & "," & ctl.ItemData(Itm) End If Next Itm Me.txtCursisten = Cursisten
End Sub
And I've got a SELECT ALL button to select all records in the listbox:
Private Sub cmdSelectAll_Click() On Error GoTo Err_cmdSelectAll_Click
Dim i As Integer
If cmdSelectAll.Caption = "Alles Selecteren" Then For i = 0 To Me.List2.ListCount Me.List2.Selected(i) = True Next i cmdSelectAll.Caption = "Alles De-Selecteren" Else For i = 0 To Me.List2.ListCount Me.List2.Selected(i) = False Next i cmdSelectAll.Caption = "Alles Selecteren"
The only thing is that when I use the SELECT ALL button, the function List2_Afterupdate doesn't work anymore. There must be a simple solution but I just can't figure it out. Can anyone please help me?
Hopefully somebody can help me on this one. I searched the whole internet and access forums, but I didn't find the exact solution for my problem.
I've got a table with students, a table attendance, where I now only save the students who are absent, but I would like to save also the students who are PRESENT (at the same time). I've got a combobox where I filter the Class, which then updates a listbox with the students from that class. What I do now is select the students from the listbox and then press a save button and it saves the records to the table absence with STATUS: ABSENT.
I would like to save the NON selected students also in that table, but with PRESENT in the column STATUS.
I thought of making another listbox next to it, where after selecting the absent students, they wil apear and disappear in the PRESENT table so I can store all the information. But the only problem is that I can find this solution when the listbox is populated by a list of values instead by a table or query. And the other solution is to store the temporary data into 2 different tables, but that's not working for me because it's a multi user database and everything will be messed up.
Hope that someone can help me, I will be very happy.
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?
When using the MS Works database the "Find" command makes a new table of all records that include the chosen words. The "Find" command on Access 2002 does not do this, nor does any filter command. Is there an easy way to do this in Access?
i have a data sheet form which I need some help with!! I have a lot of data that I need filtering.
The first filter is for day and the second is for time of day. I.e. i want to be able to click on a date (using the calender from MS datepicker) and have the datasheet return the records for that selected day.
But I would also like another field that can filter it down to a specific time of day. e.g. 27/06, 13:00 returning all the records for this specific time slot.
At the moment there is a filter for date AND time but I would like date AND/OR time.
Also I would like to have it setup so it automatically gets rid of data over 2 months old, is there a way to do that, if not automatically maybe with a macro/command button??
i have a form bounded to a table called street. this form has 2 bounded text boxes: country: lookup field to the country table city: luukup field to the city table
i want to do the following: when GetFocus on the city text box, i want to filter in thi stext box for all the cities that belong to this country (value in country text box) how?
Hey all I am having a problem with my form filter. I was wondering if you can just direct a filter from form 1 to form 3 without referencing form 2. I am thinking not cause I am having a problem getting the filter to work. Here is the code I have in my load form.
I have this database that list companies and what type of loan they have. I am having a hard time thinking of the right type of filter to use. I am looking to select multiply types of loans and have it filter out the companies that have that service. I was thinking of a list box or options but I am having trouble with the table. My question is how would you go about it? Thanks
hi hope someone can help. I'm making a form to select country/state/city for members i made a table with 3 columns country,state,city
i wrote down the states for 2 countries (the ones i'm gonna use) the city is left blank (since i don't want to write down all the cities just yet)
i'm looking to do:
When i try to display the Country as a drop down using a query that selects the column for country, i get a list of the same country the amount of times it is in the table for each state. I only want to see each country once. even though in the table it is written several times.