Forms :: How To Change Combo Box Headings
Feb 3, 2015How can i change the combo box fields headings. by default it comes according to the table/query field name. I need to put some thing meaningful.
View RepliesHow can i change the combo box fields headings. by default it comes according to the table/query field name. I need to put some thing meaningful.
View RepliesI have a Graph that uses a crosstab query to generate the data. Its only a simple query. One of the fields is project type, but in the query this changes to a number instead of text? I would like to have this as text but don't know how to go about it. I have searched forums and tried Allen Browne's suggestion on specifying column headings but no luck.
I have attached the initial query and the crosstab query in the screen shot as well as the graph. My aim is to get the project names in the legend, instead of 1, 2 as shown.
I have inherited an Access 2003 database and have been asked to improve the functionality of said database. Specifically, I have been asked to create some charts for improved reporting. I used the wizard to create a crosstab query to support the chart(s):
Code:
PARAMETERS [Forms]![Switchboard]![ActualDate] DateTime;
TRANSFORM Sum(qryPMCompletion.CountOfWOs) AS SumOfCountOfWOs
SELECT qryPMCompletion.PA_Priority
FROM qryPMCompletion
GROUP BY qryPMCompletion.PA_Priority
PIVOT qryPMCompletion.wo_Completed
WITH OWNERACCESS OPTION;
Now what has happened is that the wo_Completed is a Yes/No field so my column headings and therefore my legend comes up as "-1" and "0" instead of "Closed" and "Open".
Is there anyway to change the name of the column headings or shall I just create my own legend?
I've been able to find the code I need to import the file, but there are headers that come through from the group sending the excel file that will not import - they have a "." in them and that won't work. I need to find a way to remove the character and bring the excel header in line with the access table I'm importing to. I'm using the following to import the file:
Sub Example()
'the path to the excel workbook
Dim strExcelPath As String
strExcelPath = "C: est est esting.xls"
'import data from excel
Call DoCmd.TransferSpreadsheet(acImport, _
acSpreadsheetTypeExcel8, "testtable", strExcelPath, _
True, "A1:AA11")
End Sub
And that work fine up until it hits the offending headers. what is a good, quick bit of code to plug in to alter the headers and what, if any references would need to be added?
I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.
So my questions are:
1) can this be done
2)If it can be done, how can I do it?
I maintain a large database of employees. I have a form with a combo box (cmb_department) which I can use to select a particular department. I have written an After Update event procedure which updates the relevant fields on the form after I've selected a department - e.g. their new manager's name, phone number, etc. based on my departments table.
Here is my code, which works well:
Private Sub cmb_department_AfterUpdate()
If (Me.is_leaver = "" Or IsNull(Me.is_leaver)) And (Not IsNull(Me.employee_number)) Then
MsgBox "This member of staff is an internal HEY employee. Their departmental details will not change to that of the department, however they can still be set up with GP Browser access."
[Code] ....
However, I'd like to do two things which I'm currently unable to get working...
1. If I delete the department name from the box, or select a NULL value, I get a VBA error - run time error 94, invalid use of Null. I will sometimes want to select a Null value to "unassign" a person from this particular type of department but I'd like a way of selecting a Null value and having it simply set to Null which if the form's default value for this field.
2. As you can see I have a MsgBox which checks to ensure you want to overwrite the existing data for the member of staff. If I select Yes then it overwrites. If I select No I'd like for it to set the value of cmb_department back to the PREVIOUS value. At the moment my script sets it to NULL which doesn't really work - for example, say someone is currently set to the Sales department, and I accidentally click to change them to the Warehouse department, I'd like clicking "No" to revert them back to Sales...
In the database, there is a table called "Jobs" which sales enquiries are entered into. In this table, there are fields called "JobStatus" which has the default text of "Quotation Pending" and a combo box "JobLive" which is a "yes/no" field. Normally a job will come in as quotation request and the "JobsLive" field will be set to "no".
Occasionally, a job will come in as confirmed from the outset. In this case, the job will be marked as "live" in the combo box "JobLive". Is it possible to change the "JobStatus" field to "Job Live" when this combo box is changed to "yes"?At any other stage, the "JobStatus" field will be changed using an update query as and when changes are made.
What to do, I have a form that will reset online user of my system the field is yes or no type boolean and i using combo box that will show only online people but my problem is how to reset the yes to no when i choose from the combo box a username I want to logout. I use command button also.
View 1 Replies View RelatedI'm trying to sort and filter a continuous form. I want to sort by descending and ascending, but I also want to have a combo box for filtering. For example, there a combo box for sorting with Value List as the RowSourceType, the list would be "Ascending" and "Descending", and there should be another combo box to choose the field to be sorted with RowSourceType as Field List from a query.
My field names are: "LastName", "FirstName", "MiddleName". But I want them to appear as "Last Name:, "First Name", "Middle Name". I want to be able to change the display of the field names within my combo box which should come from my query. How is that possible? I already tried to put caption in the properties but it didn't work.
So I have a combobox that pulls values from a table. I am being requested to do an update to the database which means that I have to filter some values on that combobox based on a field on a previous form.For example:The main form is called "frmcontacts" and has a table field called "txttypeofcustomer" which can have two values: "customer" or "dealer".
The form that contains the combobox is called "frmnewissue" the combobox is called "cmbissuetype". "frmNewIssue" is opened through a button on "frmContacts". This combobox pulls the values from a table "tblissuetype". The values in that combobox are then: "Repair" "Return" "Question" "Replace".
If the value on txtTypeofCustomer is "Dealer" then all the values for the combobox remain visible. If the value of txtTypeOfCustomer is "Customer" then "Replace" cannot be visible or has to be greyed out.
How to change a combo box to a text box control in a subform for a field that is based on a two-column value list. I want to be able show the value in the unbound column (which is a text value instead of a number).
My subform has a field called "ProjectStatus". This field is a value list in my projects table with the following row source:
1;"Built";2;"Unbuilt";3;"Active";4;"On Hold";5;"Completed (Master Plan)";0
So, it is set as a two-column value list with a number data type for the bound column. In my forms, column 1 is made invisible (set to 0") so that only the text value is shown to the user. This works fine with combo boxes.
However, I want to change the unsightly combo box to a text box and show the text value of the unbound column (this form will only be used to show data not for entry). When I change it to a text box control, the value that appears is a number, of course.
If ProjectStatus were based on a table, rather than a lookup value list, I would query it but I am not sure how it should be done with a value list. I could just store the text value instead, I guess, and redo a bunch of stuff or I could create a "Status" table and redo a bunch of stuff (this seems like my lot in life lately) but I feel like there should be some way to do this.
I have been looking some information on changing image based on form combo box selection on form.
I manage to do case by case but i need it in a simple code because their will be many employees just to avoid adding case by case code for each one.
Private Sub Emp_IDCombo_AfterUpdate()
Select Case Emp_IDCombo.Value
Case "AM-001"
Imageholder.Picture = "C:UsersAMGDesktopam-001.jpg"
Case "AM-002"
Imageholder.Picture = "C:UsersAMGOne DocumentsHR & Admin DatabaseEmployee Picturesam-002.jpg"
End Select
I have employees table where all images location is saved in text field and i have a combo box on form which is employee id.
Tables relationship
Employees_table [PK] to Contracts_table [FK] via field name {emp_ID}
Fields Name
Combo Box name on form Emp_IDCombo and row source is SELECT Employees_table.Emp_ID, Employees_table.EmployeeName, Employees_table.Emp_Pics FROM Employees_table;
Text field is located in employees_table called [Emp_Pic] for images location.
I have two combo boxes in the form header and command buttons in the form detail. The combos allow the user to select either a customer or a prospect, then the command buttons open forms that only show records pertaining to the customer or prospect selected. Combos are "4Custcbo" and "4Proscbo".
1.How do I change which command buttons are available depending on whether the user has selected a customer or a prospect? Do I use two different subforms or is there a better way?
2.How do I hide the other combo box once the user has selected either a customer or a prospect?
Hi everyone,
I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g
cboContinent cboCountry
Africa Zambia
Africa Congo
Africa South africa
Europe England
Europe Holland
If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland
Thanks
Humphrey
I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form
2346 location warehouse price 29.99 (button - green)
2347 location shop price 29.99 (button - red)
There are two main methods of navigating around the top-level form on the database I am currently working on.
One is by a drop down menu listing GP practice names - so you can scroll down to "Dr Watson" for example and then all the subforms display the correct info.
The second way is by clicking on "Previous Surgery" or "Next Surgery". This is obviously a lot easier for data entry than having to use the drop down menu each and every time!
However there is a problem, in that when one uses the second method - the highlighted value in the combo box does not change! You can literally navigate through hundreds of surgeries, and though the address changes in the subforms etc "Dr Watson" is still proudly displayed in the combo box.
So we have a situation where it would be pretty easy for someone entering data to think they were on the correct record when in fact they were not, leading to errors in input.
Is there a way to force the combo box to "refresh" to the same value as the current record, effectively displaying the title?
Thanks
Gazz
Hi all,
I was wondering how would we change the forms row source everytime a new new item is selected in a combo box.
For instance here is a table:
ID Name Status
1 Joe Active
2 Fred Inactive
3 Sam Inactive
So if the names were to be displayed in a combo box and the status is represented by a option group. How could I make the combo box change the record instead of having to use the record selector
Any help would be appreciated
thanks
i have a two column that one stores a professions and other stores a number of the profession like that:
number
professions
1
singer
2
police man
3
teacher
"number" column is a combo box, that boundColumn property is two.
i want that in the form when i choose a value in a combo box i will see the profession in other text box in my form.if i choose 2 in combo box i see in a other text box in my form police man.
Hello
Im new to access and really need some help please.
I have a table with column headings i need to split up but dont know how to write it in code.
i want to split AA: Austrailia 1-3Years into AA and 1-3
i then want to compare both those string to another table and allocate a number in a further table. does that make sense?
please help!
many thanks
I created a csv to allow me to update sage act witht he contents. The problem is that the csv file adds the Field Headings which is causing act to fail to recognise any of the data to import.
When i created a blank csv file without these headings, the data was recognised and available for import. My question is... how do i get rid of these headings?
Thanks
Allan
Looking for a way to list / print column headings in a table.
View 2 Replies View RelatedI 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.
What I want is in the combo box, I have a couple of options, say 1,2 and 3.
And I want the combo box to come up with different color when different option is selected.
I thought I have found out a way, with the following code to onClick:
If me.field.text = "1" Then me.field.backcolor = 255
The problem is, it's being shown on a continuous form.
And it changes the color on all the records. not just the one I am on.
Any thoughts?
I have a form with a sub, and that sub has a sub. I'm on the first sub trying to change the rowsource of a combo box on the second sub, and none of the following want to work.
Code:
'Me!frmRentalsSubDetails.Form!cmbEquipmentID.RowSource = EquipFilter & Me.ToLocation & "));"
'Forms![frmrentalcontainer]![frmRentals].Form![frmRentalsSubDetails].Form![cmbEquipmentID].RowSource = EquipFilter & Me.ToLocation & "));"
'Me.frmRentalsSubDetails!Form.cmbEquipmentID.RowSource = EquipFilter & Me.ToLocation & "));"
Me![frmRentalsSubDetails].Form![cmbEquipmentID].RowSource = EquipFilter & Me.ToLocation & "));"
I have a log in form and combo box.
Just want to ask if possible to change photo depends on combo box value?
Here is the link of my database. [URL] ....
I am using Access 2000. I have created a crosstab query to run monthly reports based on a fiscal calendar year. My problem is that my column heading is a parameter [Fiscal Period] that returns the fiscal week #s as column headings and they change for each fiscal period. I cannot find a way to list these in the properties box as column headings and therefore they will not display as field names and I cannot create forms or reports from them. Can anyone help?
View 11 Replies View Related