- My second table contains if it is hardware or software:
- TypeID (Primairy key)
- ApparaatID
- Type (where I entered hardware and software in 2 different entries)
- The thirt table contains operating systems:
- OSID (Primairy key)
- ApparaatID
- TypeID
- OS_versie (where I entered all the OS I want to enter)
Now I made a form I called problemen with 4 comboboxes.
- cboApparaat
- cboType
- cboOS
- cboProbleem
1) What I want is that when you select device 1 and 4 that cboType can select both hardware and software but with device 2 and 3 you can only select software.
2) If you have selected software is cboType I want you to be able to select 1 of the 11 OS I have pre-entered in the table.
3) That you get specific problems with the previous made choices. For example if you select Hardware in cboType, thta you only get problems with hardware to select from and the same with software and OS.
4) I want a textbox, that will contain the solution of the problem you selected and that if there and several solutions that you get all of them at once.
1) How to auto fill in a text box if you select a value from the last of 4 cascade comboboxes.
I have 4 comboboxes where
1 = Apparaat - cboApparaat 2 = Type - cboType 3 = OS - cboOS 4 = Probleem - cboProbleem
With all 4 comboboxes I have the vba code Me.cbo[name combobox].Requery
If I select the last combobox, cboProbeem. I want the textbox underneath to automaticly fill in the solution of that problem. I already tried to use the following vba code
Me.Oplossing = Me.cboProbleem.Column(5)
But it does not work.
2) I want to make a form for customers, where I can fill in customer info, device info and date when there contract started. Now I want to use SUM to fill in the end date of there contract.
I'm trying to filter a combo based on the selection in another combo.The twist is that I need the row source of both combos to include an "*", "(All)" selection, as I am using these combos to filter a listbox. When I add the Union query with "*", "(All)", the row source in the 2nd combo is ignoring the where clause.
After making a selection in the Comp combo, the Emp combo should be filtered. It works with no Union in the row source, but does not work with the Union in the row source.
I Have A Form With A Combobox When I Choose A Record from The Box, The Matching Info From The Table Populates A Textbox Example I Choose The Acct Number From The comboBox And The Company Name Goes In a Textbox and the phone number in another textbox looks like it is fine on the form My Problem Is That When I Look At The Table The Company Name Is In Its acctName field But The Account Number Field Has The Companies Name Aswell How Do I Fix This- and also if you type the number in the acctnumber field on the table it places that number in the acctname textbox of the form there is something that is mixed up here but i dont where
I usually use ComboBoxes to show a user-friendly name instead of an ID. For example, I would use a ComboBox of EmployeePK, FirstName + " " + LastName and set the first column as the control source but with 0" width.The issue is these are supposed to be read only. I can prevent the user from changing the field but I don't have a good solution for hiding the ability to select the drop down.
My current method is to create a transparent box over the combobox (so it can't be selected) then hide the dropdown arrow with a background colored rectangle.
In my database you can search on either number or name. I have therefor, two combo boxes. and it works well, except that...
When I pick by number first, and then try to pick another record using the name combobox, the number combobox still shows the first search I did. I would like the two comboboxes to interact with each other...
I am trying to get get 2 comboxes to refresh from one when cascading. The first combobox (Location) works, but the second one (Catches) doesn't. All I get are the Key values of the catches rather than the values...
I am wondering if it my relationship set up of if my VBA needs to be altered to accommodate the requering the two comboboxes.
Code: Private Sub cboCategory_AfterUpdate() Dim sCatchLocation As String Dim sCatch As String sCatchLocation = "SELECT [tblLocation].[Location_ID], [tblLocation].[LocationCategory_ID], [tblLocation].[Location] " & _ "FROM tblLocation " & _
I have two comboboxes on my form. When the value of the first combobox (SourceWH) changes it performs a requery on the second (DestWH) as the drop-down list needs to be filtered depending on the first value. I have this working fine but my problem arises when I need to be able to swap the values of each combobox. I have created a command button which stores the value of each combobox and then swaps them but my problem is that if I click the button the second combobox becomes blank. I guess this is something to do with the requery taking place after the value of the first combobox is updated but am unsure how to rectify this problem.
The first combobox has the following expression in the expression builder: Action Argument Requery DestWH
The command button has the following code:
Private Sub Swap_Btn_Click() Dim SourceValue, DestValue As String SourceValue = Me.SourceWH.Value DestValue = Me.DestWH.Value Me.DestWH.Value = SourceValue Me.SourceWH.Value = DestValue End Sub
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?
I tried and failed to get this to work using a multiselect listbox..I have a list of departments in tblFunctionalArea...My main table is tblStatic..I want to be able to for each record select multiple departments affected by a record and store them in the tblStatic.After looking around i couldn't find many people successfully maanging to store listbox values in a table...
I decided to create 5 fields in tblStatic and in my form create multiple combo boxes cboFunctionalArea1, cboFunctionalArea2 etc etc which are bound to these fields.I want to be able to ensure the list for any combo box requeries and takes out any selection in the other boxes.
I have this working in a strict cascade fashion i.e. in cbo1 all dept's visible, in cbo2 it takes off whatever was selected in cbo1 etc. But if someone then jumps back and deletes the content of cbo3 then the whole thing breaks or if they amend in the wrong order it breaks
I am trying to use VBA to address a field in three different subforms on a form. When I am in the VBA environment writing the code, I noticed that only two of the subforms are listed in the Project window on the upper left. I ignored that and wrote the code anyway, and when I execute the code, it works fine for the two subforms in the Project window, but when it gets to the third subform, it throws this error:
"MS Office Access can't find the field '|' referred to in your expression."
The code is this: Private Sub Test_Number_AfterUpdate() [Form_Consumables Entry].Test_Number.DefaultValue = [Form_Test Director Panel].Test_Number.Value [Form_Squawk Entry].Test_Number.DefaultValue = [Form_Test Director Panel].Test_Number.Value [Form_Event Log Entry].Test_Number.Value = [Form_Test Director Panel].Test_Number.Value End Sub
Can anyone tell me how to make all of my forms available to VBA?
I want to use Cascade Delete on a main table that has relationships with a few tables. The type of these relationships are weak and the delete will work perfectly I think. But, I am concerned about how I can only delete the FK from one of the tables because it contains a non-prime FK.
For example: Customer buys House. So Customer PK is in House as FK. If I delete customer, I don't want house deleted. Is there anyway that is native to access in how I can only delete the FK from tblHouse without deleting the house record.
Hi, all... :) I need to create cascade relationship on fly. I've succeeded to create the relationship by: ALTER TABLE tName ADD CONSTRAINT fk_id FOREIGN KEY(ID) REFERENCES tPrimary(ID) and even succeeded to check the referential integrity by: ALTER TABLE tName ADD CONSTRAINT fk_id FOREIGN KEY(ID) REFERENCES tPrimary(ID) CASCADE
The real problem comes when i am trying to enforce the cascades. I do not find any expression doing it.
the standarts of sql: on update cascade or of sql server: on update cascade go just don't work in access :(
I'm using Allen Brownes very helpful cascade-to-null relations (http://allenbrowne.com/ser-64.html) code in my database project, but there comes problems whit a foreign key and null values, cause foreign key shouldn't be null. Is there anyone else using this method with relational tables? What I should do to make this work?
All hints and tips are welcome and approciated, thanks on advantage. =)
I followed the Microsoft guide detailing how to set up two cascading combo boxes. I would like to add a third box to the cascade. I have tried making some assumptions based on the code in the example but I can't get it to work.
I have three queries set up; qryBusiness, qryBusinessUnit and qryLocation.
I am using one form; frmToolInfo.
I have three combo set up; cboBusiness, cboBusinessUnit and cboLocation.
I amended my code to the following:
Private Sub cboBusiness_AfterUpdate () Me!cboBusinessUnit.Requery Me!cboBusinessUnit.SetFocus End Sub
Private Sub cboBusinessUnit_AfterUpdate () Me!cboLocation.Requery Me!cboLocation.SetFocus End Sub
Private Sub Form Current () Me!cboBusinessUnit.Requery Me!cboLocation.Requery End Sub
I want to cascade down from Business, to Business Unit to Location.
Can anyone advise me as to what I've done wrong here.
How do I create Related Cascade Combo boxes by CD Group and Name of CD To only display the records from NAme of CD related to the CD Group
Or to to a ABC and click on Artist and then click on the list with Name of CD
Someone else is wonderinf a friend of mine in Acess you can create a inventory Database to display records related like Name of Furniture Brand, Item and Search ny Last Name to see if they bought that Item
I have a form named Welcome and would like to add two cascade combo boxes.
The first combo, named cbolist get's its data from a table named QUERIES which has three fields:
ID QUERYNAME QUERYDESCRIPTION
cbolist displays the records contained in the QUERYDESCRIPTION field which are basically the name of other tables of my database with different records (obviously).
I would like that after selecting a record in the cbolist, the second combo, which I will call cboresult, will populate with all the records of that specific table selected in the cbolist.
I need some help to crete a query that will delete data in multiple tables.
My database has 5 tables. I store data in a main table and then append the ID and SSN to the other 4 tables.
The main table has also a purge date field that I will use to delete old records.
I use a form with a textbox where I type the starting date from which remove these records.
Is there a way or example I can see on how to remove all records at the same time. I have heard of cascade delete queries but really don't know how to use them.
My idea was to remove from the maintable all records with a date older than the date in txtbox and at the same time remove all records with the same ssn in all the other tables.
I have been able to successfully solve the problem of my pages showing relevant records by using form control. How should I make my form display a new record everytime I open it? So, that when a lame user opens it , he wouldnt change the existing data on an existing record. How to solve this problem? Kindly help. thanks
Could anyone out there tell me if it is possible to make the output on an Access form read only. I want to be able to input information as records, but when it is saved I don't want it be able to be altered. Mainly I am saving recipes on a form, and I don't want my children to be able to add anything to a record once it has been saved. Thanks in advance Ken
I have a subform that shows notes entered but if there is more text in the field then you cant see it all. Can I make it so that this field will grow so the whole input is visible or can I make it so when you click on it it opens in a larger window showing all the txt?