I'm trying to create a very simple form in an Access database. Whenever I drag a textbox on the form, a label gets created with it. I want to be able to move the label without moving the textbox,but whenever I try to do that, the textbox moves with it. Its like they're linked with each other.
Is there a way to separate them from each other so that they can be moved separately?
Yes, but you are better off looking for the small square black box that appears on the top left corner of each control when you click the textbox or label. This box will allow you to drag each control independently. Don't forget Format->Align (Left,Right,Top,Bottom) it is probably more useful for tidying up controls than anything else.
You can separate the label from its parent control by deleting the label, clicking the detail section to ensure that no controls are selected, and pasting, but I would advise against it. You can do a number of useful things with labels that are related to controls and one of them is move the two together - this is useful when you have the form tidied. Another is to find the parent of the control, which is useful when using VBA to change controls.
While in design mode, With the label and field selected, click the Arrange button located on your ribbon toolbar along the top, you will see a button in the control layout section of the Arrange group. Select the remove button. This will remove the connection between the label and the field.
You can also use Group/Ungroup menu commands to establish/remove the connection. Grouping the label and control causes them to move together in design view.
Related
Update **
I found that the event is firing but there is no visual clue for the user. Is there a way to make it obvious to user that these labels are clickable.
Adding a gif to illustrate the issue.
I looked for an obvious answer on web but I could not find the solution. Hopefully, it is a property setting somewhere.
I have a continuous form with labels in form header. We have an event on double click on one of the labels. However, when the form is displayed, none of the labels are clickable. If it allows us to write events (click / dbl click) then obviously these labels should be clickable.
I looked through the properties of label but there is no "enabled" property. So, question is that how to make the label clickable? I hope it is a simple property setting.
Thanks
Labels are fine for clickable..i use them a lot to perform various operations like dynamic sorting.
EDIT : because i just noticed it...when textboxes/checkboxes/optionboxes are dropped in a form the labels that are associated with them don't have any events...you have to put explicitly an unassociated label to have its events exposed
In MS Access, if a user does not have the screen of the form maxed out like the first image.
Then when I go to type in the Comment section, the form shifts to the right and I can’t see the information to the left of it.
My question would be how do I stop the form from shifting over. I have users that use this form on multiple screen sizes.
Turn off form scroll bars in the form properties.
Make the form not so horrendously humongous. (You don't need text boxes that wide.)
Use a sub-form instead.
Make the form "prettier" and more user-friendly. It looks like you slapped it together with a wizard and didn't change anything afterwards. Find some tutorials about form building, creating a positive user-friendly experience, etc.
We've got a checkbox on a form that we'd like to be able to check/uncheck even whilst the form is opened as read-only (it's a sales/product form and when an order has been invoiced, we want to prevent changes).
I know I could add a command button in its place and even make that button look like it's a checkbox with some images, or even set up a key combination to be used instead of the checkbox, but first I'd like to know if it's possible to simply exclude one checkbox from being read-only on a read-only form.
No. You must go the other way around:
Make the form read-write, then disable all controls bound to data fields except this single checkbox.
I have a form including listboxes. I'm trying to change order of listboxes. I tried bring front or send back but they are not working in form view. I found z index property for arranging their priority. However, following codes are not working. Is this correct way to do it? Or is there any other way with or without codes to do this?
Me.Controls.SetChildIndex (Me.List0 , Me.List1)
Thanks for any help.
Without using code:
You can change the z-order by right-clicking any control and selecting "Position" then selecting either "Bring to Front" or "Send to Back."
Unfortunately, Access does not support the ZOrder method for manipulation using code. Microsoft Forms does support the ZOrder method which can get confusing when it comes up on Access Help.
As I reread your question, I wonder if you're talking about tab order. If so, right-click and bring up "Properties," select the "Other" tab, then adjust the "Tab Index" property. Also, make sure that the "Tab Stop" property immediately beneath is set to "Yes." In code you would use FormName.ControlName.TabIndex=0 to set a control to the first tab position.
Hope this helps!
Reference: Personal experience (and hours of frustration)
docmd.RunCommand acCmdDesignView
forms("form1").Controls("text0").inselection=true
docmd.runcommand acCmdSendToBack '(or docmd.runcommand acCmdBringToFront)
docmd.RunCommand acCmdFormView
Also, ZOrder is still not supported by Access 2016. As such, I have not yet learned a way to write a single line of code that puts a control in between two others, I just send the middle to back and then the back to back, and expand this to however many controls have to overlap.
And last, even though you use the VBA for ZOrder, your English does ambiguously sound like forms("form1").Controls("text0").TabIndex=34, which as Olek suggested, is also quite simple.
I did this on one Access form: The control I wanted on top I just cut and pasted it back to the form, then moved it over the one I wanted to cover. In this case, it was a text box (bound), almost the same size as a combo box (unbound); only the dropdown of the combo extended a bit to the right of the text box, so when the form was loaded the text box looked like a combo box. The user clicked the dropdown and made a choice and the record(s) pulled up were reflected in the text box.
I'm fairly experienced with MS Access 2003, but 2007 has a new feature that is confusing me.
I'm maintaining an Access database with a variety of reports. Some of these reports have fields with constraints on where I can move them. If I move a field vertically, ALL the fields in that section must move with it. If I move a field horizontally, it automatically switches with the field next to it.
This is clearly a feature since it makes some kinds of reports easier, but it's just getting in my way now since I need to have detail fields on 2 lines. Can someone tell me what this thing is called and (more importantly) how do I turn it off?
The feature is known as "Control Layouts." Here's how to get rid of them:
Remove controls from a control layout
Removing a control from a
control layout allows you to place it anywhere on the report without
affecting the positioning of any other controls.
Select the control you want to remove from the layout. To select
multiple controls, hold down the SHIFT key and then click the controls
that you want to remove. To select all of the controls in the layout,
click the layout selector box at the top left corner of the layout.
Do
one of the following:
On the Arrange tab, in the Control Layout group,
click Remove.
Right-click one of the selected controls, point to
Layout, and then click Remove. Access removes the selected controls
from the layout.
TIP To prevent a control from being inserted into
a control layout as you move it, press and hold the CTRL key, and then
drag the control to where you want it.
The full documentation for the above excerpt can be found here: Modify, edit, or change a report