I have a combobox(cmb_periode) which I am populating with a querry when I select a value from another combobox(cmb_periodicite).
This all works well, but I have a problem when I want to remove the items from the combobox(cmd_periode).
Its a little wierd cos it deletes the first record and gives me an error saying that the 2 is not found.
My code is given below...
Private Sub cmb_periodicite_Click()
For hasItem = 0 To cmb_periode.ListCount - 1
cmb_periode.RemoveItem (hasItem)
Next hasItem
id_per = DLookup("id", "periodicite", "libelle='" & cmb_periodicite.Value & "'")
Set rs = CurrentDb.OpenRecordset("SELECT periode.libelle FROM periode where [periode].[id_periodicite]=" & id_per)
With rs
While Not .EOF
stringItem = rs!libelle
cmb_periode.AddItem (stringItem)
.MoveNext
Wend
End With
Form_indicateurMesure.Requery
rs.Close
I have a List Box in a table and it is set to permit multiple items selection from it .
The fact is I can select, as I wanted, multiple items from it through the Form but when I go to the correspondent table to see the results the selected data from the List Box isn't there .
Note all data selected from the List Box is visible trough the Form but not the table .
Has this problem anything to do with mismatch in data type configuration on the table ?
My form is a profile of a dog and contains a Dog_ID. The ComboBox is a list of dogs names and shows all the females I want it to show all the females less the female that it is being linked with.
I want to use combo box to select the resources to assign, but want to only show the remaining item, each time I click for new record.for example staff allocated for different jobs.
seat assigned to each person, so each time the free seats only be displayed in the list, Not the already assigned.
I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].
The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.
As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.
I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.
The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.
I have a combox with the following query in its RowSource: SELECT [Error Codes].[ID], [Error Codes].[ErrorCode], [Error Codes].[Active] FROM [Error Codes] ORDER BY [Error Codes].[ErrorCode];
I now need to change the query's Rowsource via code and so far I have figured out that this works:
However, the table "Error Codes Missing" also has a field called "Active" which I need to take into account; If the error code is not active then it should not show up in the combobox.
I know how to do that in the original RowSource, but how do I do it with code?
I just want to know how to manage items in set and individual item. Suppose my product list are
individual items = A,B,C,D,E,F,G,H,I,J,K and 5 pc set = A,B,C,D,F and 3 pc set = G,H,K
How should I design the table. Previously I designed the table for individual items and whenever orders for set is placed user had to enter individual items with quantity.
E.g. order is for 5 pc set = 3000
A=3000 B=3000 C=3000 D=3000 F=3000
Now I need to just say 5 pc set and it should be automatically populated. And also if order have combination of individual and set items.
I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.
Code:
Private Sub Manufacturer_AfterUpdate() If (Me.Manufacturer.Value = "Siemens") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SeimensTable" Me.Model.RowSource = "SELECT Model FROM SeimensTable" Else If (Me.Manufacturer.Value = "Samsung") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SamsungTable" Me.Model.RowSource = "SELECT Model FROM SamsungTable" End If End If End Sub
But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?
How would I modify multiple comboboxes in subforms at the same time. For example.. In main form ComboboxA user selects 1992, Combobox1 in subform1 is also changed to 1992, as well as Combobox2 in subform 2.
I have 2 comboboxes, the first one is called "activity", whereby I have 3 options to choose from, and the second is called "level".
When I click an "activity", for example Drawings, I want the "level" combobox to list a unique set of options for that category. and if I click on a different "activity" for example Planning, I want the "level" combobox to show a completely different set of options.
If anyone can give me any help on how to do this then I would be very grateful!!
I've tried searching the forums and haven't found quite what i'm looking for. I would like to be able to change the source for a combobox based on another combobox. The simplest way i can summarize that is i want to be able to choose A or B, depending on my choice i want another combobox to display all the values that A or B can have.
I've read some tutorials on this sort of thing, but I can't seem to piece it all together to achieve what I want.
I have a table Products that contains the fields Product, Size and Brand. I also have a form, frmProducts, that has a combobox linked to each of the fields in the Products table. I want to be able to select a product from the first combobox, tab to the Brand combobox and have only those brands associated with the product already selected.
This is how I think it should work: 1.ComboBox1 selects productA 2.ComboBox2 takes its options from a query that searches Products table for all instances of productA and displays all available brands. brandA is selected. 3.ComboBox3 get its options from another query that searches for all instances of productA that also have brandA and displays all available sizes.
What I'm having trouble with in particular is passing the data between queries. For example, I can't figure out how to tell the query to search for all instances of productA when its defined by the first combobox. Do I have to store it as a variable somewhere?
I'm not good with access at all, i'm basically after removing all workgroup protection from a database file. I have full access to the file, admin passwords etc, i'm just having serious difficulty trying to find a tutorial or any information regarding how it can be removed!
I use the template service call management . In the work order section there is a field called Entered By . I would like to remove it as I do not need it and if you do not enter it the work order will not complete . Is there a way to remove it or make it so you do not have to enter anything there >> I have tryed to remove it but somehow it is connected to some thing else and I get error
I am totally new at this database stuff. I have been searching the archives for a couple hours and confused on how to accomplish what I need to do. I saw references to using a module but I have not used that feature yet.
I am using Access 2003. I need to remove/delete " - " space dash space, "-" and "&" from a string in one field (DGName). I'm trying to do this with a make table query
DGName P1000 P1000 - SMLS P1000-CA (not a type error) UD000 - C&B V-NET
I posted an earlier question about an Access query export to Excel putting leading apostophe (') before all data. To remove them I thought I would use Find/Replace but the Apostophe is not recognised!
Is there a way (programmatically) to remove the first character of each data entry in each cell in a column?
Can anyone please help me, I currently have a series of queries that are called by a macro, these create a number of tables. But when each query runs it provide a prompt stating what it is doing, my question is can these be stopped so that the queries run without a user being present.
I have a table that has mutliple records for the same person. I know how to create a query to remove duplicates but i don't know how to create a table to remove duplicates but keep the most recent record. Is this possible?
ie client status date 123 A 1/1/07 123 C 2/5/06 123 A 9/3/07
When I ve gone in and deleted a record from my table (new table just testing it) ie. enter number 1 deleted it and than gone in and entered (on the form) another enter the (auto number) goes to 2. I want to know how to i get it to go back to the previous number.
Both tables contain the same data; however the “tmptable” contains updated data. How can I compare both tables and remove all the duplicate in the tmptable, leaving only the updated data.
I will be comparing the fields “IsMandatory” from both tables
I have a field that contains serial numbers. The serial numbers are entered in difference formats. Some will have dashes, spacing and periods separating the numbers (example: 06-65432 or 06 65432 or 06.65432). I am trying to create a search field for this and the different formats makes it difficult. Is there a way to remove all separators so that all parts of the serial number are together?
i have a form with various fields, on this form i have an archive button that places certain fields in an archive form. however this does not remove the information from the main form. pls see attached
I am running a query to return records from a table. I want to eliminate records from the query if the values contained in one field are duplicated. I have tried using the DISTINCT keyword but it only works if the entire record is unique or if I was retieving just one field
in a form I've created showing products bought, when I add a new new order it still keeps the previous order's data, how can I prevent that from happening?