Hi, i was wondering if it's possible in a listbox with the multiselect option set to extended simply click on a field and open a form with the data of this field..
example:
i've a listbox of my customers, (only first and last name)..i click on one of this and a new form with all the details'll open, so i can see and modify stuff...
with the multiselect set to none this works..but with the extended??
(btw..i wanna just click on one filed, but i need the extended multiselection on for other options..)
How to populate a list box using another list box on the same form. I have this working completely fine if the the source list box has the multi select property configured to be off, however I need it to be set to extended multi select.
I have a table, "people" which has all the main data stored. I have another table, "organizations" which I'd like to be able to use on a form to select which organizations people belong to. I created a button on my main form which opens another form on which a listbox with all the organizations shows. What I'd like to do is from the main form, click a button that brings up a new form. On the new form, I can select the affiliations. Then, when I close that form, a box on the main form shows what i've just selected. I got this to work with the listbox, but when I changed it to multi-select it stopped working. Help!! Thanks.
I want to be able to select multiple items from a listbox, click a button, and then print the data related to that item selected using a report.
In the report to print the data, I have added the criteria [Forms]![Print Labels]![List2] This is the name of the listbox. However, this doesn't print the items selected in the list box.
Do I have to do this through VBA, or can I accomplish this through a query in the report?
I have a multiSelect Listbox that has email recipients. I have a command button with Me.emaillist = Null, and after I click the command button the Listbox is still highlighted in black. What VBA command do I create to completely clear the multiSelect Listbox, including the highlighted selection?
I'm trying to create a database where a single "Classification" field is populated by selections made in a multiselect listbox and I can't figure out how to do this. Any help people can provide?
Table 1: Name_ID <pk> Name Classification
Table 2: Classification_ID <pk> Classification
What I want to happen is click on a button next to the Classification field (text) and a popup form with a multi-select list loads (this part is easy, of course). The user can select as many classifications as they want, click the ok button and each item selected then goes back to the first form and populate in the Classification field (seperated by commas or semi-colons). This possible?
I have adapted code from ghudson's example on 'http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=52736
I have a subform called frmsJobPartsUsed, which contains a multiselect list box where the user can select multiply parts used for one job and click a save button, which saves the parts to rows on the same forms (see picture). The user then enters the number used and that number is taken away from the UnitsInStock. This form is made up of the following two tables; TblStore PartNo PartName UnitsInStock ReOrderLevel Discountinued Remark
The multiselect listbox is made form tblStore, PartNo, PartName and Discontinued = 0
This all works fine so far.
What is need to do is before the parts selected are saved to the table I want to run some code to check If a part’s UnitsInStock is equal to 0 then Message box saying no stock left need to reorder. It won’t save it to the table. Or else If UnitsInStock is greater than 0 but less than or equal to ReOrderLevel Message box saying Stock running low need to reorder asap.
I have this kind of working but it doesn’t seem to be finding the correct UnitsInStock for the part selected. Here is the code;
Private Sub cmdAnswer_Click() 'SAVE BUTTON On Error GoTo ErrMsg:
'Code adapted from ghudson's example on 'http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=52736
Dim myFrm As Form, myCtl As Control Dim mySelection As Variant Dim iSelected, iCount As Long
Dim myDB As DAO.Database Dim myRst As DAO.Recordset Dim myRstCount As DAO.Recordset
Set myDB = CurrentDb() Set myRst = myDB.OpenRecordset("tblPartsUsed")
Set myFrm = Me Set myCtl = Me.lstAnswers
iCount = 0 'Count number of selected records/items For Each mySelection In myCtl.ItemsSelected iCount = iCount + 1 Next mySelection
'Check if anything is slected If iCount = 0 Then MsgBox "There are no Parts selected..", _ vbInformation, "Nothing selected!"
For Each mySelection In myCtl.ItemsSelected If Me.UnitsInStock.Value = 0 Then MsgBox "Out of Stock!" & Chr(13) & "Please returen to Orders or Store to Re-Order Stock. " & Chr(13) & " ", vbOKOnly + vbCritical, "Re-Order Stock" myCtl.Selected(mySelection) = False
Else If Me.UnitsInStock.Value > 0 And Me.UnitsInStock <= Me.ReOrderLevel.Value Then MsgBox "The Store is running low on stock!!" & Chr(13) & " Please return to Orders or Store to re-order as soon as possible.", vbInformation, "Need to Re-Order Stock" End If End If Next mySelection 'END
iCount = 0
'Go throught each selected 'record' (ItemsSelected) in listbox For Each mySelection In myCtl.ItemsSelected 'Current count of selected items iCount = iCount + 1 'Print value to Immediate Window Debug.Print myCtl.ItemData(mySelection) 'Add answers With myRst .AddNew .Fields("JobDetailsID") = Forms![frmJobs]![JobDetailsID] .Fields("PartUsedNum") = iCount .Fields("PartNo") = myCtl.ItemData(mySelection) .Update End With Next mySelection
Private Sub cmdUnselect_Click() 'UNSELECT BUTTON On Error GoTo ErrMsg:
'Code adapted from ghudson's example on 'http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=52736
Dim myFrm As Form, myCtl As Control Dim mySelection As Variant Dim iSelected, iCount As Long
Set myFrm = Me Set myCtl = Me.lstAnswers
'Count number of selected records/items For Each mySelection In myCtl.ItemsSelected iCount = iCount + 1 Next mySelection
If iCount = 0 Then MsgBox "There are no selections to Un-Select..", _ vbInformation, "Nothing selected!" End If
'Go throught each selected 'record' (ItemsSelected) in listbox For Each mySelection In myCtl.ItemsSelected Debug.Print myCtl.ItemData(mySelection) myCtl.Selected(mySelection) = False Next mySelection
OK - I have seen the other posts where individuals are trying to select multiple items from a list box and have a field populate with the selections. I have not seen a clear explanation defining if this is possible.
Essentially, I want to be able to query on the field and search for multiple selections within that field. Any recommendations as to how this can be achieved?
My next question, is if the selections in a multiple instance field are separated by a comma or some other character what is the best method to query for multile responses. For example, if the following data is in the field 1,2,3 and I want to query on 1 or 2?
I created a form with a ListBox and a Command Button. The users selects the values in the listbox and then click the button to create word documents. I've written VBA code to accomplish this. But it's not working properly. It opens multiple word documents but all for the same one.
Private Sub Command6_Click() Dim appWord As Object Dim varItem As Variant Dim strPathToTemplateFile As String Dim strPathToProspectiveFile As String Dim strPreferredFileName As String For Each varItem In Me.List0.ItemsSelected
I would like to use a listbox set to multiselect to add records to a junction table. I've been using code to accomplish this with checkboxes (love how it looks and works) but after moving my tables to Office 365 as the backend, linkedto a local frontend, sql does not like this particular set up, and I do not have the time or knowledge to sort out why. So what I need is a step by step to look at the many, in this case possible roles a contact can have, and choose one or more, which then creates a record in the junction table with the contact id and role id.
I would prefer to not use a combobox on a continuous form because every time a user goes to select roles he would have to scroll through all the choices for each separate role.
The user can select multiple items (non-sequential) on the listbox, say items 1 and 35313. I'd like the listbox to scroll (meaning display) to the currrently selected item, so that the user can see it while being processed.
I've seen stuff about property ListIndex, which does exactly that, but it's only useful when you have just ONE item selected (in a multiselect listbox apparently it deselects the rest of the items, so no point in using it, I guess, unless there's more to it!!).
So the key here is how to do the scrolling/display.
The code to loop through the listbox and process each selected item is attached:
Code: Dim vItem As Variant Dim Content as String For Each vItem In Me.lst.ItemsSelected 'scroll to selected item ??? 'processing of the selected item Content = Me.lst.Column(1, vItem) 'copy the content to do sth with it Me.lst.Selected(vItem) = False 'unselect the current item Next vItem 'go to next selected item
how to scroll to the currently selected item? Mind that I need to go through the list of selected items to process them for further use (i.e, I need them selected).
I have created a multi field search form that have 2 textbox and 2 multiselect listbox(extended). How to make the search form query correctly? Below are the details.
I also have a button that run the query qrySearchForm .how am I going to make the query run successfully with multiselect listbox ? I understand that there are a lot of examples of the vba code for multiselect but that is only for multiselect alone and not like my search form that combine textbox and multiselect listbox.
I am creating a form based directly on some paperwork which needs to be logged electronically, Unfortunately this extends well over the 55" that Access allows for a form. Not a problem I thought, just create a second form and place a continuation button on the first...Obviously not. When I place information on the second form, it throws a new record in the table meaning that the table ends up twice the required size and half the records have one side of the data and the rest is on the other side. What do I need to do to sync these together properly?
I have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.
Private Sub Cover_Page_Form_Load() OpenTimer = Timer End Sub Private Sub Cover_Page_Form_Timer() If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes End Sub
Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.
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 :)
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
I have an unbound form. To the left I have a list box with a list of employee names. To the right I have a bunch of text fields. Once I've entered the data, I click on a button and it adds a new record. It works perfectly provided I add one employee at a time. It gets painful when I have multiple employees and I'm entering the same data.
Is there a way I can multiselect employees from the listbox, fill in the data fields and add multiple records which just one click??
Now i need some help here. I adapted this code from somewhere on this forum. But iam having a problem with using the 'ALL' criteria. It Opens a Report Dynamically from multiple selections in the two multiselect ListBoxes, but when i select 'All' and select any other item in another listbox For Example(All in Names and Home1 in Homes) it gives me all the Results. I have tried several criterias to solve it out but iam still failing. Hope there will be help. Attached is a sample db in A2K and A97. Thanks in Advance.
I'm new to this message board and I'm glad i came across it. I've been looking for a way to multiselct search using Combo boxes.Reading through the threads here i found one (Posted by SBaxter). I've use the SQL Statements and VB code for my search. It works but not like his for some reason. The problem i'm having is when you open the form it asks for criteria like a parameter Query does. You have to type it in before it loads, unlike his where you click what you want out of combo boxes. At first i thought it was something i did wrong with the query but i've noticed that in his DB if you have the form open and then open the query it doesn't act like parameter. It does if the form is close. With mine that doesn't matter i still have to type it in! So i'm guessing it's with how i set up the list box in my form. I've attached a copy for someone to look at.
I have a list box with a bunch of names in it that links to a subform on a master form. At the moment I click on a name and update details in the subform. It would be nice if I could multiselect names then update details all at once without having to individually change each one. I tried the multiselect property but I get index or relationship errors. I don't have any relationships (because I'm not adding new records... just updating) and I changed the indexes to NO. Didn't work. I tried!! Any idea how I might get this working??