Combo Box And Text Box Help.
Jun 25, 2006
Hi,
I have a combo box on a form with three values, when I select one of the values I want a text box to show a corresponding value.
The combo box has three values for different types of memberships; under18, over60, and standard, these have different prices. So what I want is for when one of the values is selected the text box will show the price.
Any help on how to do this? The database is below.
View Replies
ADVERTISEMENT
May 21, 2014
I'm looking for a way to have a text box auto fill based on the selection of a combo box on the same form. I cannot use the method i find all over the internet of using multiple columns in the combo box and basing the text box on that because the combo box already has multiple columns being used to determine its own possibilities and other combo box possibilities.
I would really just like the text box to work like this, but im still kinda inexperienced in VBA...
If combo box is "F004-001", then text box is "237"
If combo box is "F004-003", then text box is "280"
I know how to add in an "after update" thing, but i do not know how to do If/then statements.
View 1 Replies
View Related
Jun 4, 2013
I have been creating a form, based on only one table. Here I am displaying data as text boxes and subfrom from the same table. At the beginning, I was interested in controlling the display of the data according to the combo box (in this case is the PO number). Now, I would like to add another combox box which is the year (I have a column with the date, and also I have a column that shows only the years digits in my table) Also, I have a subform that display the data from the same table specifics records that I want. It means that I want to pick the year first, and then in the combox box of po number shows only option of that year, and hence the text boxes and subforms change accordingly to the two combox boxes.
View 2 Replies
View Related
Jul 22, 2014
I am trying to print on report the value of combo box which is based on the query
SELECT qryDept.DeptID, qryDept.Department
FROM qryDept;
with formula
=[Form]![FormName]![comboboxName]
But my problem is its printing ID of the combo box instead of text value which is name of the dept. say HR
View 1 Replies
View Related
Jan 23, 2007
Is there a way whereby I, or another user, can amend the ‘TOP’ value of a query via a Combo or Text box entry on a form? I have searched this Forum for a solution to this very problem but have had no success. I understand how to achieve this via the queries ‘SQL’ view but cant figure out a way to do it by the way that I have already described!!
Your advice or a ‘pointer’ in the right direction would be extremely well received.
Thanks for your time.
Have a nice day...
Kind Regards
CarolW
View 2 Replies
View Related
Jan 24, 2005
Hi,
This one is really confusing me!
I have a text box on a form that is bound to a field in a table that is populated by a combo box coded into the table whose data source is a select query.
Everything looks fine in the table, but when I display the data on the form it is displaying a different field of the source select query than the one displayed on the table.
Why is this, and how can I fix it?
View 1 Replies
View Related
Jan 27, 2005
I've a form with a combo box "OrderNumber" (to allow the user to select the correct order) and a text box "Date" which displays the date of the order selected.
The problem is that I don't know how to synchronize the boxes.
I know the procedure to do it with two combo-boxes (cmboDate=Null & cboDate.Requery in the after update property of the cbo "Order Number"), but is it possible that when I change the order selected in the combo-box, the text box shows the correct date?
Thanks for your help!
View 7 Replies
View Related
Mar 29, 2005
Hey guys
This is the problem,
I have 2 fields in a table. Cityand Country.
City Country
paris.......France
madrid....Spain
london....England
milan.....Italy
Rome.....Italy
ETC
Field "City" is connected to a combo box and field "country" to a textbox on the form.
I would like the user to select a city from the combo box. When this is done the textbox linked to the country field should automatically update to show the correct country. This should update without user intervention.
I would find it better to have the text box look up a value list rather than use a table for its source. the form is being used as data entry. The combobox linked to field "city" is also a value list.
Thanks in advance.
Nitesh
View 5 Replies
View Related
May 17, 2005
Aaaargh! It's a couple of years since I got my hands dirty in Access and I seem to have forgotten more than I thought! :(
I have a simple database which includes tables STOPS (stopID, stop name, routeID, Cost band), JOURNEY(CustID, routeID, stopID), and ROUTES (routeID, Route name, Bus co).
I have a main form with the customer number on linking to a sub-form on which the user will select the route from a combo box and then the stop from a combo box. All works fine but I want to filter the stop combo box to show only stops on the route already chosen.
I've done similar before but I have tried all sorts and failed to get anything to work. Any help appreciated.
View 3 Replies
View Related
Sep 26, 2005
I have a combo box that I use a barcode scanner with. I scan the barcode and it finds the product using the code below:
Private Sub cmbBarCode_Click()
' ADD A TRANSACTION AUTOMATICALLY
Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset
RS.Open "SELECT * from tblTransactions", Application.CurrentProject.Connection, adOpenStatic, adLockOptimistic
RS.AddNew
RS!OrderID = ID
RS!Barcode = cmbBarcode.Column(0)
RS!Manufacturer = cmbBarcode.Column(1)
RS!ProductName = cmbBarcode.Column(2)
RS!QuantitySold = -1
RS!Cost = cmbBarcode.Column(4)
RS.Update
RS.Close
Set RS = Nothing
lstTransactions.Requery
End Sub
What I need to happen is all the above but after it has finished or before it starts it needs to clear the contents of the box. So the barcode is entered it runs the above script and then removes the barcode from the combo box, so I am ready to scan the next barcode.
Thanks,
Danian
View 3 Replies
View Related
Sep 26, 2005
I am trying to set the result of a query as the default value for a text or combo box. I have tried setting the query as the default value in the box's property. I have also tried doing it in VB. The code looks like this
Dim SQL AS String
SQL = "SELECT Address
FROM Table1
WHERE Name = Forms!Main_frm!name_lbx.Value;"
Forms!Address_frm!address_cbx.DefaultValue = SQL
I have also tried
Dim SQL AS String
SQL = DoCmd.OpenQuery([update address_qry])
Forms!Address_frm!address_cbx.Value = SQL
Where update address_qry is the same as the above.
I keep both forms. I know how to do it by setting the queries as values in a list box, then transfering the values to the text or combo boxes. But I was hoping there was an easier way.
Thanks
Alex
View 1 Replies
View Related
Sep 26, 2005
I am trying to set the result of a query as the default value for a text or combo box. I have tried setting the query as the default value in the box's property. I have also tried doing it in VB. The code looks like this
Dim SQL AS String
SQL = "SELECT Address
FROM Table1
WHERE Name = Forms!Main_frm!name_lbx.Value;"
Forms!Address_frm!address_cbx.DefaultValue = SQL
I have also tried
Dim SQL AS String
SQL = DoCmd.OpenQuery([update address_qry])
Forms!Address_frm!address_cbx.Value = SQL
Where update address_qry is the same as the above.
I keep both forms open. I know how to do it by setting the queries as values in a list box, then transfering the values to the text or combo boxes. But I was hoping there was an easier way.
Thanks
Alex
View 2 Replies
View Related
Feb 7, 2006
Hi
I would like to know how can i reference a combo box to the value of a text box on the form it is for a purchasing system.
if i select product one i only want the the order quantity for that item to show and the same with the price field as all the reorder levels and cost information is stored in a table. i have created queries only selecting the product code and reorder quantity and the product code and the cost price.
hope someone will be able to help
regards
melanie
View 14 Replies
View Related
Oct 26, 2006
I know how to base the combo box on a query, and in the after update enter
Me.[txtboxName]= Me.[cboName].Column(1)
BUT...
I want to bound the combo box to a control source.
How can I achieve that?
Thanks~
View 3 Replies
View Related
Dec 3, 2006
I have searched and looked for this throughout the forum but can't find it.
I have a simple text box which I want to populate based on a combo box. The combo needs to display the table's field name and the text box needs to display the record. Is this possible?
Cheers,
Rene
View 3 Replies
View Related
Apr 8, 2005
Hi All,
Thanks so much for your help in advance. I’m working on a Form1 that has a combo box with Row Source coming from a query Just like:
NAME ITEM_ID
Smith 10011
Smith 10012
Scott 10022
Clark 10015
Clark 10016
Now, I want to be able to update the Item_ID value to text boxes txt_SN1 and txt_SN2 once I click on the combo box and select the name “Smith” then show 10011 in txt_SN1 and 10012 in txt_SN2. I’m not sure if this can be done with record set or just with column values from the query.
Can someone help me with this problem? Your help will be highly appreciated.
Mosquetero
View 2 Replies
View Related
Jun 23, 2005
I have one combo box and a text field. When I select the Analyst name from the combo box I want to display its corresponding Badge Id in the text field. Both the Analyst name and the Badge Id are in the same table.
Please help me out with it.
View 5 Replies
View Related
May 22, 2006
Hi there, I hope someone will take pity on me and help me as I am new to databases so here goes.
I have combo boxes in a form that the user would like to be able to press the Enter key and just go to a new line, not go to the next field. This is so they can have say 4 sentences but have each one on a new line in the combo box. Hope this makes sense.
Thanks
View 2 Replies
View Related
Dec 13, 2007
This will be a tricky one!
I have a bill of materials screen, where my operators will input parts that they require for a job
From this they have the ability to click on the part number they require to check if there is stock available in our stores
This will open the warehouse screen which is set as a continuous form.
The structure of the warehouse records is 1 line per batch. Each batch can contain multiple qtys.
I.e Part Number - JF5650 could show Qty: 50
When the operator goes into this screen i have given them the opportunity to reserve a some or all of the existing stock qty from a batch to a work order. They can do this by selecting the work order in a reserved combo box, and by typing a qty to reserve to the qty reserved text box.
Hopefully this is all making sense so far. Everything i have explained above works fine.
My problem is,
Many different work orders may require stock of the same part, my current setup does not allow the batch line to reserve against more than 1 work order.
Can anyone think of a way around this? At the moment i am playing on the idea of creating a seperate table for reservations linked by warehouse record which will allow the multiple lines but bringing that into a continuous form still has me thinking.
Adding multiple reservation and qty boxes is not an option. And i don't really want to change design to much as this db has 80 odd forms all doing there bit.
Thanks AOG (if i make any progress i'll keep this thread updated)
View 6 Replies
View Related
Apr 18, 2014
I have a field that is a combo box that I would like to convert into a text box. When I try to change the 'display control' to 'text' I loose all the information that is displayed in the field. I want to keep the current values that are there now, just do away with the combo box.
I have tried simple things like copy and paste, but that just makes the new field a combo box as well.
View 5 Replies
View Related
Feb 20, 2006
May I start by saying Hi and that im just embarking on understanding Access 2003. I do know a little about DB as I have built programs in VB6 using databases. But now onto my problem which seems a simple one.
I have a Db called delivery. With columns as below. Mtno being the key.
Mtno Orderno Description Quantity Customer
I populate a combo box with Mtno, but on the click event of the combo box i wish to populate textboxs from the other columns.
Code used.
Private Sub Combo0_Click()
Me!text2 = Combo0.Column(1)
Me!text3 = Combo0.Column(2)
End Sub
text2 gets populated and updates on the click event of the combo box but text3 doesnt. Niether do the other text boxes when I put the code in.
Help me understand this please.
kind Regards
Tony
View 4 Replies
View Related
Dec 19, 2005
I have a number of categories on which I assign a relative risk - at the moment H, M and L. Previously I had these set as a value selection combo and they were as 'text'.
More recently I have changed this now to a lookup and put the risk rating into a separate table. As a consequence the field is now 'numeric' but displays text from my combo.
When running a linked query I now get an error message instead of the required response.
My query should report back a 'Yes' if the queried cell contains an 'H' or 'M'.
Audiometry: IIf([tblRiskProfile]![Noise]="H" Or [tblRiskProfile]![Noise]="M","Yes","No")
However, this obviosuly doesn't work now because of the cell properties being numeric. How do I ammend the string above to run the same query?
View 1 Replies
View Related
Mar 9, 2005
Hi
I have a table in my database with customer records including account number and account name. On a form I would like to set up a combo where the account number is selected and for the corresponding account name to appear in an adjacent text box.
The customer account number control is currently a textbox for manual entry but I want to change that to a combo with the AccountNumber field set as the control source.
I would like to know how to get the customer name to appear in the CustomerName textbox when the account number is selected from the new combo.
Any help would be appreciated and I enclose a copy of the form on a word doc.
Thanks
VC
View 1 Replies
View Related
May 25, 2005
:mad: I have a combo box which is being used for surname searching. It displays surnames in the first column and first names in the second column. I would like the user to be able to type or select a surname from the dropdown list and where there are multiple entries of that surname select the correct record. At present the first matching surname is the one that keeps being selected.
I am displaying the complete record in fields lower down in the same form.
I also have a firstname search combobox but the code will be almost identical.
Can someone help me with this problem. Thanks in advance.
View 2 Replies
View Related
Feb 5, 2006
I have a report card program that I use in my classroom. The program calculates letter grades for various sub categories.
For example, under the Primary Category Math, the computer will calculate a letter grade based on assignment scores and place the grade into a combo box for the sub category "Able to use a graphing calculator."
If I override the grade the program calculated for a student, I would like the text in the combo box to change to red for that student only. Then I can go back and quickly see which grades I have manually changed.
I just cannot seem to figure out the logic to use VBA that would check to see if a user has changed individual combo boxes.
Thanks ahead of time for any ideas.
View 2 Replies
View Related
Jun 15, 2006
hello can anyone please help me with this form?
I have a form in which has one drop down combo box and one data entry text
box.
The combo drop down box comes from a query of all active contracts from my
contracts table.
the second box has a unit ID number which the user enters.
All information entered in this data entry form goes to a Unit table.
My contract table has three columns: Name of contract and Type (only three
types): A, B, C. (contract table) and then a column that says active or
inactive.
i.e
Name Type Status
113 A active
114 B inactive
115 A active
116 A inactive
120 C active
121 C inactive
This is where I am stuck…
When a user puts an unit id number and then selects from the listbox one of
the active contracts for the first time is ok. For example: the user entered
unit number 123 and selected contract: 113 which belongs to type A.
What I need is that next time the user put the same unit number in the text
box then the contracts he could choose for that selected unit number could
only any of type B or type C. he/she can no longer choose other type A.
so basically for every unit id number i could have only one contract type A, only one contract B and only one contract C. :confused:
Can someone give me some light in how to start this?
View 4 Replies
View Related