I have combo box # 1 with value list of "OLD" and "NEW" and combo box # 2 with its row source coming from a query. Here's the scenario - A user chooses "OLD" on the first record from combo box # 1 and the code works fine. But when the user chooses "OLD" again on the next record, what code do I write so that combo box # 2 displays a 0? So to re-itirate, please help me write the code if the item on the list is selected again, the value of the other combo box would display 0?
I have a combo box linked to a look-up table. There are 8 fields in the look-up table but only if one of three is chosen do I want additional combo boxes to become visible. Do I put the code in the "after update" or "on change" event of the combo box and how do I express the code-
If TechniqueCombo="caudal" or "spinal" or "epidural" then TextNeedleType.Visible=True
I have a form that calculates freight costs. I'm using a combo box for the user to select the route of the shipment from shipping port to destination port. The combo box has 2 fields. The index which is stored in the database and the description which is displayed to the user. I used the wizard to create the combo box and set the index to be saved in a table. Everything works fine, the freight cost is calculated correctly and the data is stored as designed.
The problem is when if the user goes back later and opens the screen to view the freight information, the combo box doesn't display what was selected previously. Therefore, no freight is calculated and the user has to reselect the combo box again. When I check the table, the index value of what was selected is in the table, but it will not display in the combo box.
. . . . Additional info to this post. . . . The combo box is set to use a data from a standard table. The user can only select what is displayed in the list. However, the index is then stored in another table after the selection is made. I want the combo box to do something like, if a selection was previously made then displayed what was select, if not, then display the data from the standard table.
What did I do wrong during the set up? Thanks for your help solving this problem.
I need some help please I have a db that has three forms (1 frmSearch, 1 frmFindCountyInfo and 1 subfrmFindCountyInfo (embedded in the frmFindCountyInfo) I also have 2 tables (States and CountyInfo with StateID and CountyID set as PK in each). Now I am trying to design it in such a way that when someone double clicks a State from the Mainform (FrmSearch), it should bring the frmFindCountyInfo with the corresponding state info for that State and this works fine. Now in the subfrmFindCountyInfo, I want the user to be able to pick from a combobox a county within the Counties from the state selected and displayed in the frmFindCountyInfo Data Source for FrmSearch: States Data Source for FrmFindCountyInfo: States Data Source for SubrmFindCountyInfo: CountyInfo I also have a one to many relationship defined between StateID in States table and StateID in CountyInfo Table (I dunno if I am using it right though)
I have a query that works in Datasheet view but when I run the form, it picks just one county and there are non on the droplist. Any help will be very much appreciated. Here are my queries… Query to get State and Corresponding Info (works Fine)
SELECT States.StateID, [State] & " " & [Alias] AS StateFullName, States.Alias FROM States;
Query to get County and corresponding data (seem to work in datasheetview but pulls up just first alphabetical county in combo box on form)
SELECT CountyInfo.County, CountyInfo.ReleaseFee, CountyInfo.ReleaseComment, CountyInfo.AssignmentFee, CountyInfo.AssignmentComment, CountyInfo.AdditionalInfo, CountyInfo.LastUpdated FROM CountyInfo INNER JOIN States ON CountyInfo.StateID = States.StateID WHERE ((([Forms]![FrmFindCountyInfo]![State])=[CountyInfo]![State])) ORDER BY CountyInfo.County;
Also when I run subfrmFindCountyInfo alone ( I have to input State) it has the drop down with all the counties. I dunno whatelse to do. Any help willbe very much appreciated.
I have created a combo box that simulates browsing, but limits it to a single filepath. I would like to store this file path along with the filename into my database in a field. There are two ways of doing this that I have found work, but i need a less cluttered way. 1) My rowsource string is created byrowString = rowString & filePath & fileName &";"fileName = dirthat's in a loop that reads all the files in the directory.... the problem with setting this rowsource to my combobox is that its very long and cluttered looking combo boxMy secont way is: rowString = rowString & fileName &";"fileName = dirThen i make a hidden text box whose value is filePath + Me!cboBox where the cboBox has the string value of the file (Sample1.jpg) In this instance i make the text box the control source instead of the combo box... but I'm pretty sure that's a bad way of doing what I want to doboth of these ways seem ... redundant, so i was wondering if there is a way to do this otherwise ?
I am fairly new to VBA, having done no fromal training. I have taught myself quite alot and I am pleased with how i am progressing. I am stuck though!
I am building a booking system for a friends business, all free of charge as I believe it's a good project to get experience in VBA.
The booking form has a 'Date' Combo box, 'Name' Combo box and a 'Time' Combo box. The 'Time' Combo box displays times in 10min intervals from 0600 to 2100, and this data is stored in a table called 'tblTimes'. I need to build a query that checks the main table 'tblBooking', for a selected date chosen in the 'Date' Combo box by the user, to see what times have been used up and thus only display, in the 'Time' Combo box, those times not yet used for that particular datedate.
I am sure, to some of you experts out there, that this is quite a simple query. I looki forward to your input.
I'd like to be able to select a choice of printer manufacturer(as a combo box), which will then display all the printer cartridges made by that manufacturer in a table below the combo box. I have made the forms (with the relevent combo box looking up manufacturers) but am now sure how to relate the two so that the table updates, depending on which manufacturer is selected. Again this seems like a simple problem but I am new to access and sitll working my way around the program.
(Yes, I have tried goodle, but I can't seem to find quite what I'm looking for)
I'd like to be able to select a choice of printer manufacturer(as a combo box), which will then display all the printer cartridges made by that manufacturer in a table below the combo box. I have made the forms (with the relevent combo box looking up manufacturers) but am now sure how to relate the two so that the table updates, depending on which manufacturer is selected. Again this seems like a simple problem but I am new to access and sitll working my way around the program.
(Yes, I have tried goodle, but I can't seem to find quite what I'm looking for)
In my table, I setup a multivalue field. In the screen, I can check off more than one selection. It stores the selections in the table as value1, value2, value3, etc...which is fine. However, when I go back to review the entry in a report or a screen, it displays it exactly the same as it is stored in the table - value1, value2, value3, etc...Because of size limiations, the field is only so wide, thus it only shows value1, va...and then the rest cut off.
Regardless of how wide I make the field, all of the values will not be displayed, plus, if there is only one value, it will be a waste of space. What is the best way to display one (if there is only one selected) or all of the values selected ? Is there a way to display then vertically, like value1, (next line) value2, (next line) value3 ?
I am posting this question again, as I think there was some miscommunication from my side. I sinccerely apologise.
Actually there are three fields on a form.
1. Combo Box : Label is Name 2. Text Box : Label is Code 3. Text Box : Label is Department.
These three fields are stored in the table.
I wants that when the form gets loaded, then in the combo box field all the names from the table should appear. When I select the particular name from the list and the focus is lost from the combo box then the two values from the table should show the corresponding text boxs.
I am posting this question again, as I think there was some miscommunication from my side. I sinccerely apologise.
Actually there are three fields on a form.
1. Combo Box : Label is Name 2. Text Box : Label is Code 3. Text Box : Label is Department.
These three fields are stored in the table.
I wants that when the form gets loaded, then in the combo box field all the names from the table should appear. When I select the particular name from the list and the focus is lost from the combo box then the two values from the table should show the corresponding text boxs.
Can anyone create a form with a combobox where you can select a form and this form will display in an static area. Then you can choose another form in the combobox and it will display in the same spot. the forms that will be displayed are exactly the same size.
Hi all! i am wanting to display a signature (jpeg image) when a combo box is displaying "Yes" and the picture to be hidden when the combo box is either empty or set as "No". i have before managed to change colours of other fields depending on combo boxes - but my coding isnt that great, so i dunno what code is req'd!all help much appriciated!thanksDave
My Combo Box is tied to a table with many entries. When I click on it to display the table values it takes several seconds to display. Is there any way I can "pre-load" the Combo Box (such as on form load, etc.) so when I click on it it displays more quickly? Or is there another way to speed it up?
I can't figure this out! My user wants a combo box with the Rec ID, Item Description, and Item Number. When she selects the Item Description, she wants only the Item Number to appear in the combo box, not the description.
This would be easy if she wanted the list to have the Item Number next to the rec ID, but that's not how she wants it to appear. Can you please help?
Go nice and easy on me. This is my first serious DB and i've picked a cracker to start with.
Basically i am trying to set up a booking system for excursions, booking seats on coaches, trains, printing tickets, vouchers and information.
At the moment I'm trying to populate a text box (txtExcursionCost) in a form with a cost with is drawn from a table (tblExcursions).
tblExcursions holds information about the excursions including the info which populates combo box (cboExcursionTitle) and combo box(cboExcursionDate). The date combo is dependant on what is selected in the Title combo. The text box (txtExcursionCost) needs to be dependant on the Title and Date combos to get the right cost displayed. How could I get this to work?
The reason for the text box is that it only needs to be displayed to show the user the cost of that particular excursion and to create a base for a calculation for Amount Due at the completion of the transaction.
I'm curious whether it's possible to display the label for a combo within the box itself, i.e. it would say something like "Enter Name" until the user clicked on it and opened the dropdown?
I found this which is really old and I couldn't get it to work.URL....
i have a table of 3 columns Named as C_Name, C_City and C_PIN..i have a combo box with All Value (All,C_Name,C_City and C_PIN)...i want to display All columns ,when i select All in Combo box and when i select Column C_Name, only display C_Name Column).
I have 2 Comboboxes, one for Region and one for Country, and am attempting to initalize/cascade them. Here is the basic info for the the underlying tables:
1. Every Region has at least one Country 2. Every Region has one and only one Overseer 3. An Overseer may be responsible for more than one Region
Characteristics of the Comboboxes:
1. Both use 2 columns with the Name field (first column) being displayed and the Abbreviation or Code field (second column) being the bound column. 2. The nominal case is that both comboboxes will have multiple items to select and in that case the comboboxes are initialed with a query containing a UNION that inserts the string "<ALL>" (same string in both columns). 3. When the case arises that an Overseer manages a single Region or a Region contains a single Country, the Union query is bypassed such that the "<ALL>" string is excluded.
The comboboxes are used to create a filter condition to drill down into a potentially very large recordset.Now to the issue at hand ...
The Region combobox is initialized first. The initialization is accomplished by setting the RowSource property to an appropriate query. The first entry in the item list is then loaded to the combobox Value property by the following line of code:
Me.cbxRegion.Value = Me.cbxRegion.Column(0,0)
This always works whether there are multiple items or just one. If there is just one I set the Enabled property to FALSE; no point in reselecting the only item avaliable.The Country combobox is then initialized in a similar manner using appropriate code that is virtually identical to that used for the Region combobox.The problem I am having is that if there is only a single Country, the Name is not displayed in the combobox but is contained in the selection list. Note that i do not have a problem with the Region combobox when it is initialized with a single Region.
I have searched this forum and others and found similar inquiries and a couple of possible solutions; some clearly don't work while others appear to but result in run-time errors later in the execution of the code (run-time error '2115').I do not have a simply test case I can upload at this time; also new to the forum and appear to be restricted as to my ability to perform uploads.
I want to create a combo box on a form where I can choose between 5 company names, and upon my choice, I want a list box or another combo box to display the departments under the company I chose (each company has different departments), and when I choose the department, I want to another combo box to display the limited job titles under that department.
For example: I choose company A > combo box displays the 5 departments under company A (dept.1,2,3,4) I choose dept. 4 > display job titles under dept. 4
How to set combo box for example doctor name with 2 field which display doctor name and department.
Lets say if i select doctor name : Eric and automatically display doctor department as: Surgery in text box. Then I can save patient record on appointment table.
I have access2007 Currently i have a tabbed form on one tab i have a combo box to select names.On the following tab i have a text box which i want to display the selection made with the combo box. At first i was just getting a number on reading related issues on this forum i tried =[CMB_salesman].[column](2) unfortunately that gave no result.