I have a report base on my table. Here a check box. I wanna show two label text hide/show base on when check is true or false. It will be when report will be open. I have try this but nothing is happened.
Code: If AffecteAc= True Then affected.Visible = True general.Visible = False End If
I am pretty new to VBA and I am having the same problem of hiding and un-hiding columns on a datasheet of a split form. I am building a system that will be used in front of customer and therefore wish to hide columns that contain cost sensitive data. The same forms need to be able to show the Sales Rep the hidden columns simply by ticking a box. Basically a toggle on and off of hidden columns.
I have been playing around with the code below (which i found in another forum) to hide the Field called COO when I click the tick box called chkHIdeFields check box. This works on a Single form but not on a datasheet of a split form.
Private Sub chkHideFields_Click() ' Note: vbTrue = -1 If Me.chkHideFields = vbTrue Then Me.COO.Visible = True Else: Me.COO.Visible = False End If End Sub
I have been able to hide the column of my split form by using the ColumnHidden property of the On Load event just as a proof of concept that the ColumnHidden property actually works to hide a column, which it does. This is the code that im using to hide the column called COO.
Me.COO.ColumnHidden = True
However if I then set it to = False and then close and open the form, it doesn't unhide the column. the only way I can unhide the column is to do it from the Form view via the un-hide dialogue pop up box.
I have two issues here, the first one is getting the form to recognize when to hide and when to show the column of the datasheet on the split form and the second is to get the code to for the check box method.
Lastly once I get it working for 1 field I need to be able to define a list of 7 or 8 other fields all at the same time.
I created a split form. My main form is just a form, based off of tblBlotter. The subform is based off a query, which is the based off the same tblBlotter. (Not sure if this is proper - maybe I just need the table?)
I have a link master and link child field set to ID. When I open the form "subBlotterHistory", it opens and shows as a new record only. I want it to show ALL records on the query subform and be able to scroll up, down and edit.
I'm currently building a database in Access 2013. I've used Access many years ago, and not really in anger since maybe 2003, so I've been re-learning quite a lot. Here's an overview of my scenario, and issue:
The main purpose of my database is to allow engineers to log various bits of information when building, servicing and testing manufactured products for offshore exploration. Because some of the engineering team aren't so great with data entry etc, I've decided that, rather than deleting data, I'm going to use a 'deleted' flag: user clicks what he considers to be a delete button, but in reality an update query will simply update the flag and, because the form is built on a query which includes a 'where deleted = 0' filter, it'll no longer be shown. This will allow us more control over the data and will also allow me to check that everything is running okay.
My main forms include a number of subforms, including one which includes a second tier of nested form: Pin Maps for (electrical) Connectors.
What I need to achieve is fairly straightforward: as the user navigates around the form, I'd like a 'delete' button which is specific to that subform to become visible and for any other 'delete' buttons to become hidden. Once tested, the buttons would be 'stacked' in the same position at the top of the main form, so the user just thinks they're deleting the relevant record in the sub, or main, form.
how to hide the the 'Details' section in my form when viewing it in Split Form. I tried to use
Code:
Private Sub Form_Load() Me.Detail.Visible = False End Sub
but that just makes the Details section look blank, as oppose to not having it there at all.
have only the Form Header and Datasheet visible in the Form View of my form. Similar to the 'Contact List' form in the Contacts Template that comes with Access.
I am trying to make a checkbox with different graphics since the checkbox can not be resized. I thought I could stack images on top of each other and toggle between showing and hiding based on if the checkbox was checked. This actually works, but I wanted to hide my checkbox, so I hid it behind my images. This didn't work. So I brought it to the front and made it invisible. This didn't work either. What can I do? The checkbox is linked to the table, but I want the graphics to show thumbs up or down and not see the checkbox.
I have a subform that populates from a query from a table. I also have a checkbox as part of the table. If the checkbox is ticked, I don't want that record to show in the subform
Is there a way to display/hide the information on a subform using a checkbox?So, when the checkbox is checked, the fields are blank but when the checkbox is unchecked, the information displays?
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.
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.
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 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 have a form (employee info) that requires the user to do a search to find the employee before then editing anything that needs to be edited.
I have a search box that will find the relevant record without any problem, however what I am looking to do is hide text boxes on the form and have them appear only once the search has found the matching record.
If no matching record is found, I would then like a message box that states 'No matching employee, would you like to add an employee' and when the user clicks OK, it then reveals the same hidden text boxes and sets focus to the first one of the bunch.
Now, I have used the 'me.textboxname.visible = True (or False) elsewhere, however, I am not sure how to trigger that after a search.
I assume I am looking at an If statement, but I am not sure how to construct it, hence turning to the experts.
Code: Private Sub txtEmployeeSearch_AfterUpdate() If txtEmployee = DLookup("EmployeeNumber", "tblEmployeeInfo") Then Me.txtboxname.Visible = True Me.txtboxname2.Visible = True DoCmd.GoToControl "txtboxname" Else MsgBox "Employee Not Found", vbYesNo <<<<<<<<<<<<<<<<<<<<<< End If End Sub
I know that there is a massive gap where I have put <<<<<<<<<<<<<<<< - but I am stumped as to what to put in there?
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've got a main form with two lists boxes. I want to show the visible columns in my subform (which is a datasheet) in one listbox and show the hidden columns in the other. Also I want to allow the user to hide / show columns using right or left arrow buttons between the list boxes. My subform is bound to a stored procedure using ADO.
I have a check box list on my form for all 50 states, so the user can choose any number and any combination of possible states, which I need the user to be able to do, but when it displays the data it does so horzontally and delineated by a comma. The problem with this is that if enough states are selected, it eventually gets cut off at the end and doesn't display the last states. Is there any way to make it instead show vertically, since at least with that I can format around it and not have a horizontal bar going all the way across the form?
1. The code below should equal the Current Month 2. It does not close the form if no data.
PHP Code: If DLookup("[CurMonth]", "tblEmpEvaluation") = Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ") DoCmd.OpenForm "frmEvalNotice" End If
PHP Code: If DLookup("[CurMonth]", "tblEmpEvaluation") <> Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ") Then 'No Data. NotWorking? DoCmd.Close acForm, "frmEvalNotice" End If
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 form and subform. The main form shows some customer details, and the continuous sub form shows that customer's charity donations.The code below runs when the form opens, and binds ADO recordsets to the two forms. The binding appears to be successful.
However whatever I do I can't make the subform update correctly to show the relevant customer donations. For example, when I use the **'d lines to update the link child/master fields, I get a "Data Provider Could Not Be Initialized" error.
Code:
Private Sub Form_Load() Dim cn As New ADODB.Connection Dim rsCust As New ADODB.Recordset Dim rsDons As New ADODB.Recordset
I have a form based on a query. I'd like to add a search box to the top to look up values and then populate the rest of the form. I can't do it with the combo box wizard because the relevant (third) option doesn't show up, I assume that's because the form is based on a query not a table.
I've msgbox'd the txtProblemID and the correct ID is being passed. Where I fall into an error is on the frmUserInformation's onLoad event which uses the ID form the frmUserInformation.txtUserID box. The error I get is "Syntax error (missing operator in query expression '[fldUserID]='."
What I've narrowed it to is the timing between the docmd.openform and the onload of the form. I've tried changing the onload to be on activate - and it just opens empty.
how to get the docmd to open the form correctly before the onload tries to fire?
I have a number of forms that are bound to recordsets as follows:
Dim rs As New adodb.Recordset
sqlQuery = "Select * from myTable" rs.Open sqlQuery, sqlCNN, adOpenKeyset, adLockOptimistic Set Me.Recordset = rs Set rs = Nothing
In Access 2003, users could open these forms and filter on basically any field by using the right click-> Text Filters functionality.
In Access 2010, this functionality appears to work (users can apply the filter and the Toggle Filter button in the ribbon shows a filter is applied), but all of the records are still visible in the form.
Any work-around that does not involve redesigning the form to be non-recordset bound?