Queries :: Automate Show / Hide Of A Column Not In Use
Dec 18, 2014
I want to automate a query so when the user views it they see only the columns that have data. Columns that do not have data are not there.I am using MS 2007
My Access tool is setup to import data into tables and then the user views the data imported. However, if their's no data (and no column to import) I want the query report to not include the column.
Currently I have a query where the criteria is dependent on the combo boxes on my form. I would like to add checkboxes to my form which determines which fields are shown or hidden. For example if I had a checkbox for address, selecting it on my form will show the address column in my query results.
I'm tracking the holiday entitlement of a team of people. I use a query to work out how much unbooked holiday they have to take.
My problem is where I'm scheduling next year my query returns the names of those who have booked a holiday and their remaining entitelement. That's as it should be. However if someone hasn't yet booked any holidays then it simply doesn't display their record. I would like it to treat that record as zero and show the remaining entitlement as a full years entitlement.
Here's the SQL SELECT Employees.Trainer_Name, Sum([2015 Holiday].[2015 Days]) AS [SumOf2015 Days], Employees.Holiday_Days, [Employees]![Holiday_Days]-[SumOf2015 Days] AS 2015 FROM [2015 Holiday] INNER JOIN Employees ON [2015 Holiday].Trainer_Name = Employees.Trainer_Name GROUP BY Employees.Trainer_Name, Employees.Holiday_Days;
The problem here is that the Sum of 2015 holiday is Null
I'm trying to create a report where I can use a section header as a hyperlink to show/hide detail, but only for that section. For example, my customer names are:
Code: ABC Co. ZYX Co. 123 Co.
If I click on ZYX Co., I want it to show the contracts for ONLY that customer:
I have a subform in datasheet view and I wish to selectively hide columns I'm not using (depending on the query). I wrote a small function to make it easier. Here's my code: Function HideColumn(myForm As SubForm, myLabel As String) myForm.SetFocus myForm.Controls(myLabel).SetFocus DoCmd.RunCommand acCmdHideColumns End Function So all I do is send the subform name while I'm using the parent form and then give it the column name to hide. Oddly enough this code works for columns such as "Net B" and "Net% +/-", but it doesn't work with the columns "Period B" or "Period A". On my subform the text boxes and their labels have the same name (if that even matters). I keep getting a 2465 error (field not found) no matter what I change the column name to.
I've got Form with some drawings on it and I'd like it change depending on what the user has entered in certain fields on the same form. For Example: when the user selects a certain type of item in the "Item1" field, I'd like the graphic to change (or another one appear) in the form. Basically an "If this is true, show this picture" type thing. I've been trying a few things to make this happen, but to no avail... :( Any incite anyone could give would be most appreciated.
How do I easy create a checkbox that displayes a field when I check it. For example, if I check a box named I agree, it shows a field with a phonenumber to call
I'm using access 2007. I'm trying to get a combo box on a form to show or hide an image on a report based on the combo box's value. It seemed simple, but I've tried lots of codes.
I have a combo box which is populated by a table with the fields ID, First Name and Surname. What I want to do is display the first name and surname concatenated and hide the ID column, but populate the field with the ID number.
I have a sub form with checkboxes. Each check box represents one of the columns/fields in my query. If one of the boxes is checked, I only want the column that matches with the check box to appear. I have done some research and have came upon the ColumnHidden property.How would one do this in a macro or VBA format.
I use DoCmd.ShowToolbar "Ribbon" acToolbarNo (or acToolbarYes) depending on a value in a table which I have shown certain "trusted" users how to change.
But is it possible to do something similar with the Navigation Pane?
I want to add a section to my report and control the visible value based on page (1st, 2nd, etc...)
So:
1st page show 'Page Header' which has lots of detail, but dont show 'AccNum.Header' section.
2nd, 3rd, etc.. don't how 'Page Header' as I don't need lots of detail, but show the 'AccNum.Header' as this has customer name and Invoice numer, which is enough header information of all the rest of the pages.
Tried using 'On Page' and logoc aroung [Page] but no progress.
I want to show or hide a box on a continuous form. If there is a date in the ShopOut field i want the label to show up , if not then it will not appear.
I am trying
If IsNull(Me!ShopOut) Then Me.StillinShop.Visible = True Else Me.StillinShop.Visible = False End If
however, it shows the box whether there is a date in ShopOut on not. Is it possible to do this in a continous form or do i need somekind of me.record#.ShopOut or something.
I would like to know if the following is possible: I have a table, I have a form based on that table (datasheet view) and I would like for certain columns to visible or not based on the input on a Combobox (list of countries) that is based on another form.
I have searched on the web and I found that the following:
On a button based on the main menu form:
Code: Private Sub Go_Click() Dim stDocName As String Dim stOpen As String stOpen = Me!cboDest stDocName = "Datasheet" DoCmd.OpenForm stDocName, , , , , , stOpen
and then on the event "on open" of the form Datasheet I have inserted the following:
Code: Private Sub Form_Open(Cancel As Integer) Select Case OpenArgs Case "USA" Forms![Overflow]![Tasks].Visible = True Forms![Overflow]![Constant Number (Min)].Visible = True
[Code] ....
I have done it as a test, but it appears that it does not work. It opens the forms, but it does not hide or show the columns based on the option, it brings all the columns.
I have a database with a main menu which opens up on start-up it works fine and all but I want to go the extra step, I wish to disable / hide the ribbons (Top and Bottom) - Or Hide the whole Microsoft Access Window and display my form with the desktop behind it.
The next thing is once I click the X or the button to close the form I want Microsoft Access to appear again as in everything to show itself again.
The user wants all the non-basic functionality of the ribbon hiden. To accomplish that by doing the usual stuff:
File >> Options >> Current Database >> Allow Full Menus (unchecked)
Everything worked as expected, but we came across an issue. The user needs to open a report in "print preview" and they need to be able to export their report to excel. The "print preview" ribbon tab is there, but it is not showing the "Data" area, where all the export options are.
How can I do this without a costume ribbon?
Maybe there is a way of manipulating which areas of the ribbon/tabs/areas/controls are enabled from VBA?
I am creating a database for an ambulance organization to track call history. One of the fields that needs to be populated is patient's last name. I need to show the last name when printing the form for billing purpose. However, I only want to shoe the first three letters of the last name in the table. For example, if the patients last name is Smith. When printing the form I would see the name Smith, but in the table I would only see Smi**.
I am using Access 2010. I wish to show or hide controls based on the value in the combobox. The combobox is bound with the data type Yes/No. If Yes, controls should be visible and if no, they are to be invisible. The database is a linked one. This selection should update all the users' forms.
I have a reasonable large dbase with some 12 tables and some 40 Queries. In three of the tables, there are fields with dubious names like AA1, CD-3, 227, etc. I want to change these field names to some more appropriate names like : Testblok , Cspeler, Jaarnummer, etc, etc.
In doing so, I will have to go thru each and every Query ( and at a later stage forms/reports) to change the fieldnames in that query corresponding to the changes I made in the initial table field name.
Would there be another way of doing this, i.e. is there a routine for changes made in the fieldnames, being “automatically updated in the table bound query.