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've designed access form with one listbox and added 'up' and 'down' buttons to move up and down the selected item in the listbox. i.e from its selected position to one item up when 'up' button clicked and same as one item down when down button is clicked. Any VBA code will do this functionality?
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).
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.
My combobox is not working correctly. When I select one of the dropdown items in the combobox it always defaults to the 1st item on the list. I want to be able to select any of the dropdown items on the list.
I have a form for creating new entries in a table. In it there is a textbox for a City field that I would like to have some kind of auto-complete based on past records in the database--similar to how Excel provides auto-complete options within a spreadsheet based on entries in previous cells.
In other words if "Binghamton" has been entered in a past record and the user starts typing "Bing" in the textbox, then "Binghamton" will become an autofill option. Is there a way to set this up?
I am trying to populate a textbox from a field in a table based on clicking on a item in a listbox. User clicks a name from the Client table in the client field, and the date that is stored in the orderDate in the same row. I want the text11 textbox to show that date.
i have 2 tables (clients, frequencies) where in table "clients" i have a column to store ID of "frequencies" table (id, description).
in my form "FClient" i display data stored in table "clients" and i have a combobox that should display the "frequencies" descriptions, but with a frequency selected by default...in fact the one that has its ID stored in table "clients". i'm able to display all frequencies descriptions but i don't know how to easily select and then display, as default, the frequency stored in table "client"
I'm working on a project that uses a barcode scanner. The user will scan a barcode which will choose an item from a combo box. The result of what it enters will populate a text box. I have that part working fine.
The next step is to get it to open a form based on the value in the textbox. The textbox will have about 7 different possible values and each one should open a different form.
The way this is supposed to work:
User approaches a machine and scans the barcode. He is presented with a form giving him options based on the type of equipment the machine is. A compressor for example would present him with a set of options for compressors (gauge readings, maintanence, etc).
I have an unbound form with two controls:
cboAssetNumber txtType
How to code this and which events to code it in. Users will be going from machine to machine and using the form over and over again so I need to somehow manage the clearing of the form to begin again with another barcode scan.
I saw another thread about a barcode scanner and one response was to program the scanner to send the barcode and then send an "Enter" press to move focus to the next control. I've looked through the documentation and haven't been able to find if that is possible. Right now it sends the number and that's it. It's a "Motion" Tablet.
I have a combobox on an unbound form. After making a selection, I click a command button which opens a bound form to a new record. What I need to code next or add into the macro, is for the selection of the combobox to fill in the contact id, and contact name in the correct text boxes.
The combobox row source is: SELECT qryPBS.ConID, qryPBS.PBSName FROM qryPBS; bound column 1.
i have employee form to insert employee information one of its text box on click another form open of schools name where i can select the school work how can i pass selected school name to the main form
So, I have a main form with two continuous subforms like this:
frmContratos: main form frmContInsumos: contains new products frmInsumos: contains existing products
I want the user to highlight a word using a double click in a textbox called DescInsumo from frmContInsumos. And I want that highlighted portion to be used as filter for frmInsumos, which also has a textbox called DescInsumo. I used this and it's giving me the word, but it doesn't work with the double click event:
Code: Private Sub DescInsumo_Click() Debug.Print Me.DescInsumo.SelText End Sub
I have a split form that was not made by wizard. On the form part I have a combobox that is unbound to the form data set. The combobox has a query row source that is based on the current row selected. I want the combobox to have an up-to-date result based on which row is selected.
If I set the combobox to requery in the form_current event then I get what I want. I don't want to put up with the little delay that is generated every time a user changes rows because of the requery, though. I only want the requery to happen when they use the drop-down menu.
I have the requery in the gotfocus event of the combobox on the form. I mostly get what I want this way, however if they select an item in the drop-down list, then choose a new record in the datasheet, then try to use the combobox again, the combobox is not refreshed (because it never lost focus?).
To get around this, I've tried to setfocus to something on the form in the on_current event, but access gives me an error: 'Access can't move focus to the control btn_Refresh'.How can I get the combo to requery only when users are about to use it?
It related training (Training topic and Training Date). I used combobox as training topic (fill with items 0 and 1. 0 for not train and 1 for trained). when user choose 0, cursor will go to another combo box (Other training topic), by Training Date is disable, but if user choose 1, cursor will working as normally let user to enter training date.
Problem : When I choose 0 in topic control in Form View and save, It works normally (Training Date is disable), but when I Open it in Form Design View and Open It to Form view that topic control become enabled.
I have a table filled with company contacts and form with a combo box containing the contacts names.
When a contact is selected I want it to show their Telephone, Mobile and email address in text boxes below. But it only shows the telephone number and the other two fields stay blank.
what I'm doing wrong ?
I have this code assigned to the combobox:
Code: Private Sub MainContact_Change() Me.Text169 = Me.MainContact.Column(3) Me.Text167 = Me.MainContact.Column(2) Me.Text177 = Me.MainContact.Column(1) End Sub
And this is the row source:
Code: SELECT tbl_Contacts.Salutation & " " & tbl_Contacts.ContactForename & " " & tbl_Contacts.ContactSurname AS MainContact, tbl_Contacts.ContactTelephone, tbl_Contacts.ContactMobile, tbl_Contacts.ContactEmail FROM tbl_Contacts WHERE (((tbl_Contacts.ID_Company)=[tbl_CompanyBookings].[ID_Company]));
'Check if curent record is a new adn that the states combo has not changed 'warn user and determine desired action 'Reset suburbs combo and text box if user wishes to change states
I hope someone can guide me in the right direction. I have developed a database to keep track of Service Calls we receive. We manufacture and/or service a wide range of products from Automatic Laundry/Kitchen chemical dispensers to office furniture. We are currently using this data base and it works well, I'm trying to make it easier for the user.
I have a form to enter information into a table, tblService Calls. In the form I have a ComboBox labeled Issue Code which looks up information in a table tblService Issue. I also have a ComboBox labeled Service Issue which also looks up information in the tblService Issue.
tblServiee Issue looks like this: Issue Code Service Issue 101 Laundry Install 201 Kitchen Install and so on
What I'm trying to do is when I enter issue code 101 in ComboBox Issue Code, I would like the Service Issue (Laundry Install) to automatically post in the ComboBox or TextBox labeled Service Issue. Is this possible?
Thank you in advance for any help you can give me! Larry D.
I have a suppliers table and a products table. Two forms, Stock form with combobox to list Suppliers and a sub form with combobox that lists Products.I want to select a supplier from the Stock form and then the combobox in the subform to only list products directly sold by the Supplier.Have dabbled in SQL as follows:
SELECT Products.ProductID, Products.ProductName FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID = Products.SupplierID WHERE ((Stocksubform.SupplierID=Stock.SupplierID)) ORDER BY Products.ProductName;
I have a form that has 3 combo boxes and a text box that I want to be a lookup. I have a little experience with DLookUp, but I do not think that will work here. The three combo boxes are linked to queries, and Tables. The first combo box is for choosing "Precious" or "Base" metals. The second combo box is filtered from the first and displays the "Metal Names". The third combo box is to choose a "Metal Market". There are currently four options for that. I want the text box to display the "Metal Market Price" based on the second and third combo box selections.
Here is a screenshot of the table with all of the metals and their market prices filled in with dummy values for now:
metals screenshot 1.PNG Metals screenshot 2.PNG
Here is a screenshot of the relevant Form: Metals form screenshot.PNG
Here is a screenshot of the Table that relates to the relevant form: Metals table design.PNG
Here is a screenshot of the Metal Market table that the Query is based on: Metal Market Table.PNG
I would like to create a combobox on a form in which a user has three selections: negative, positive, other.
If negative is chosen a textbox auto-populates with "none detected". If positive is chosen the text box populates with "positive" and If other is selected the text box populates with "unspecified".
Got a bit stuck in a database. I have a form based on a query. On the form I have 4 comboboxes.
The combo boxes filter eachother without a problem (based on custom select query)
Now I want after the fourth combobox value is selected, I want to populate a text field with a value from a different column from the master query (after the 4 selections only 1 value should be possible)
Master query contains 5 columns: - group - type - job - insurance - charge
combo1 selects group (and filters records) combo2 selects type (from remaining records and filters again) combo3 selects job (from remaining records and filters again) combo4 selects insurance (from remaining records and filters again)
Combo4 is based on following query: -column1 Insurance Total=Group by Show=yes -column2 Job Total=Where show=no Criteria [forms]![name].[combo]
This works great and the dropbox only shows 1 OF EACH DIFFERENT record
If I add a text box and want to see the "charge" value, that I thought I could use the ME.text-code. But in order to do this, I have to add the charge column into the query of Combo4.
If I do this, the dropbox for insurance gives me multiple values that are the same. Is there any way to make this work?