'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
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]));
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 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?
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 am designing a Web Database with a bound form to a submit table.
On the form, I have a combo box with selections that should influence the value to be displayed in a textbox also on same form.
For instance the combo box for Staff Name contains list of all Staff and I want the textbox to automatically display the level of the staff that was just selected in the combobox.
I know how to get this done using a combobox but my boss insists that the level should be automatically displayed in the textbox once combobox selection is done.
Using the combobox for level, I used the select statement in the RowSource property :
SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));
I am in a dilemma of how to replicate this for the textbox because textbox only has control source and no RowSource where I can put this select statement.
Also, I will still need to bind this textbox to the submit table with the column name "TxtLevel" in the control source
Please see attached sample access db.
Also note that I cannot use action queries or VBA because it is a Web database and not a client database.
i want to know how to link 2 combobox in the access like id i chose a department in the other combobox show me the list under that department and the other think how i can create a search button to the date and to the department i want and how to create a button to calculate from many tables.
What i need to be able to do is write vba to find the value inside the comboxbox and then either:-
1. Run a macro with the same value that is in the combobox Or 2. Run a set of reports and print them off but are linked to the combobox value.
The combobox name is ODTyper The combobox control source is ODType which is a field in TblType The combobox row source is SELECT [TblType].Model FROM TblType; The value inside the combobox are in the format of TE4700 The name of the macros are in the format of TE4700 The Main form is called FrmOrderDatabase.
Plus somehow i need to get the value of the combobox and link it to print off the correct reports.
I explain briefly what is my task, When the user selects a different name from the list, I would like to link it automatically with the current Date() . I want to do it for every single name of the field so that in case I need, it would be possible to track for how many days that particular name of the list has been clicked.
I explain it better…My DB aims to monitor some procedures that have 3 status, these are:
On Working, Expired Revoked
Given the above I would like to track when every single procedure starts is “on working” and when it ends it. I want to automatically link every name of the combobox with an event that update a field of a table that monitor the beginning and to another that monitor the end (when another status is selected). After that my aim would be to calculate the diff between the two in order to have a number of the days that every single procedure is stuck into a single status. Do you think is something feasible? I hope to have explain it well… If you need I can try to explain it better
Is there a way, in access db or in its VBA, to capture the two columns of data from the combo box so that can monitor them?
I am trying to get the value of a combobox after selecting an "OK" button but get "You can't reference a property or method for a control unless the control has the focus." Most would probably say use .Value but when I press "OK" I am prompted for a value, or as in another case get Null.I tried setting the focus prior to the violating line of code, but no go.
Example:
Code: Private Sub viewByRegionOKButton_Click() DoCmd.OpenReport "byRegionReport", acViewPreview, , "RegionName = '" & regionComboBox.Text & "'" End Sub
Here's a link to a post with background (see the relationships image at the top): [URL] .....
So I got everything to work exactly as I wanted it to.. the listbox has its rowsrc manually changed via VB on form open or record change... so everytime the record changes or the form opens, VB creates a query string that pulls the TFE_Num and TFE_Name from the DB for only those records where the forms current key (me.key.value) equals the TFE_key values. And everything works.
The problem is that this VB based query is very slow... so everytime the record changes, we wait 1-5 seconds for this listbox to pull data and display it. My question is this: Is there a better way to do this, some way that doesn't require VB based SQL statement. I'm asking because all the non-listbox controls on the form use a control source and they get updated instantaniously on form open or record move, but the list boxes that are unbound and are populated using VB SQL are really slow... and there are really only 1 or 2 records ever displayed in the list box.
I have tried to set the rowsource for the list box within the properties tab and comment out the VB SQL code, but haven't succeeded. I suspect the issue is that the form is linked to all fields in the master table while the list box is linked to a 1st and 2nd generation child table... I just can't get it to work! I've tried simple adding the TFE tables and fields to the forms record source poperties, but when I do that I can only navigate to records that have TFEs associated with them.
I suspect I could resolve the issue myself, if only access queries allowed "me.key.value" to be used in the WHERE statement. Am I correct that you cannot do this in Accesses query builder or the SQL version? When I tried, it worked but then I notices the me.key.value got converted to a number (the first record) when it ran the first time.
I have a subform in datasheet view for tracking calls from clients. The Client Name is a combination of the first and last name. I want to create a text box that allows me to start typing in the client name and it will filter for only those Clients that match. Currently, I have the following code (below) for the textbox, however when I start typing in a client name all the clients disappear from the table. The client name is in a combo box so I don't know if that is making a difference.
Private Sub Text3_Change() Dim strFilter As String Me.Refresh
I'm using a very simple unbound textbox on a very simple form, with the following Expression to find me data in a query and sum the last 30 days, based on a combo-box on my form...
Only thing is, it's showing me only the data from the last 30 days...regardless of the value in the combo.
=DSum("Credit","qryIncVsExp","TransDate>=#" & Date()-30 & "#" And "AccountID_FK="""&[cboaccount].[column](1)&"")
I'm sure it's something to do with the number of "'s I have, but I'm probably more than likely ever so wrong.
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 have a date textbox (Week_Ending) and number textbox (Staff_ID) in a form (frmHourEnter), when both have values I open another form (frmStaffReport) with textboxes (txtDateStart and cmbStaff).
How do I open the second form with the values of the first form pre-entered?
I have a database for billing. In my database, I have a form that consists of a main form "Order" and 2 subforms "OrderDetails" and "Customer" OrderDetails are to enter the products to be connected to the Order. All function super, but I want to have some information from one of the forms "copied" over to on of the others.
Here is what I would like
In the subform "OrderDetails" I have made a textbox that summarize all prices to a total, his tekstbox i called "Tekst31". I would like the amount in this textbox to appear in a field "Bel�b" in the main form "Order".
I have tried some different commands, but nothing has worked, also I have made a query which dose the same ting as the tekstboks, as the information in that tekstbox it not stored anywhere.
I have a text box on 'Forma' & a textbox (named text3) on 'Formb'. I want to copy the contents of the textbox from 'Formb' to the textbox on 'Forma'. I have used the following code in the textbox on 'Forma'....
=Forms![Formb]![Text3].text
This doesn't seem to be working whether both Forms are open or only 'Forma'. Could somebody please advise as to what I am missing. Your assistance is very much appreciated.
I currently have two froms, "add record" and "add record cont." The reason I have two seperate forms is because when clients create a new record information needs to be saved to two different tables and when creating one from with fields from both tables I ran into many problems. The two tables are named : tblMain, tblFileLoc Currently there is a textbox on both forms named "fileID" the FileID in the first form is from tblMain and is the primary key for that table, the FileID on the second form "Add Record Cont." is just a normal field. When clients enter in the new FileID in the first form "Add Record" and then move onto the next form "Add Record Cont." i need access to bring the entered FileID from the first form and Fill it in the FileID field in the second form. Currently I have tried making the control source for the textbox on the second form = the textbox on the first form but it brought up an error.
In ContactIDForm it contain 1 textbox name 'TextBox' with Button Name 'Btn'
In ContactIDForm there is only 1 Text Box ContactIDTextBox and 1 Button. User Enters ID in TextBox and On Button Click Event it should check data from TextBox in Table name (ContactDetailTable) in field ContactID and if there is record matching, ContactInfoForm should Open else NewContactForm should open with ContactIDTextBox value in it.