I have an Access form which consist of many subforms ; the problem is that each subform has unwanted edge as shown in the following pic :
i want to hide this edge for each subform to reduce the form space ;i don't know if there any way to remove this edge just need any suggestions
These can be disabled by turning off Record Selectors in the form's properties.
Open the form in design view.
View the form's properties.
Under the Format tab, change the setting of the Record Selectors to NO.
Save the form.
Related
I have a Continuous Form that has two combo boxes. If I don't link them together all values appear but if I link the two combo boxes to make one of them depend on other for easier choose from, the values never show in the second combo. I try to make code with if condition in vba to requery the combo values to show in all records but I couldn't. How could I do that? Thank you for all what you do
This technique is known as cascading combobox. A very common topic. Be aware that if combobox RowSource uses an alias (displays text when saving ID) the text will not be available for display in all records when the list is filtered. This is especially disconcerting for users of continuous/datasheet view form.
Could have code that only filters second combobox when it gets focus then restore the full list when loses focus. Users will still see data briefly disappear from other records and may find distracting at first but will learn to disregard.
However, a workaround to maintain display of text is to include the combobox RowSource lookup table in a query used as form RecordSource. Bind a textbox to the descriptive text field from lookup table. Set textbox as Locked Yes and TabStop No. In continuous view, can size and position textbox on top of combobox to obscure combobox text but still show drop arrow (a "hybrid" control). In datasheet view the textbox will not be superimposed but text will be displayed.
If controls are superimposed, users accustomed to clicking into combobox text frame and typing input will encounter aggravation as the textbox will likely be the control they click. Tabbing to the combobox or clicking drop arrow will cause combobox to get focus and display over the textbox.
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 with a 2-page tab control.
The first page has a subform with a button on the subform that's supposed to requery another subform that is on the second page.
Forms!myMainForm!mySubForm.Requery
The main form and its fields are used to create new records and the subform on the second page shows these records.
Here's a screenshot of page 1's subform and button:
http://i.imgur.com/RLsgcSi.jpg
When the button is clicked, the subform on the second page shows any new record at the bottom of the list instead of being sorted in descending date/time order. Also the Funding Rate field does not seem to get its conditional formatting applied:
http://i.imgur.com/QRvI5fy.jpg
I've been able to get the subform to display correctly if I also add some VBA to the button to switch to the second page of the tab, but I'd rather not do this.
Is it possible to requery a subform and have it display correctly when the user is ready to see it?
Migrate froms Tabs to Navigation Control. Usual Tabs are preloaded and will increase the main form load time. On the other hand, Navigation control only loads the form when its opened. This eliminates your needs to manually re-query the second tab.
PS: I'm interested in something in your form, what is your best contact method?
Forms!myMainForm!mySubForm.Requery
This requeries the mySubForm control on myMainForm, but not the subform itself.
Try instead:
Forms!myMainForm!mySubForm.Form.Requery
(note: I'm not 100% sure this will solve the issue)
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.
I have a MS Access form with a Datasheet subform.
Using code, I change the ColumnHidden property of various of its columns.
But, when I close the form, I'm asked whether to save the table layout of the Datasheet's table.
How can I stop the form from asking the user to same the table layout continually?
Do I have no choice but to change the Datasheet to a regular subform?
If you are always hiding the same columns - create a query that only has the columns you want displayed and use that as the source of your subform.
If you still need some hidden fields (child keys, etc.) you will have to create a regular form. It's not too bad:
just base it on your table,
drag your columns onto the form (formatting, and placement doesn't matter)
set it to datasheet view
edit labels (these become column headings)
change the tab order (this controls the order the columns are displayed)
view the datasheet and hide the columns you want
save the form
add this form as a subform to the main form
I'm not sure there's an easy way to do this because Access saves a lot of properties with forms. If you were not using Datasheet view, you could hide the CLOSE button on the form and replace it with a command button to close the form with this code:
DoCmd.Close acForm, Me.Name, acSaveNo
But since it's a datasheet, you can't do that.
You might try embedding your datasheet as a subform in an unbound parent form, but I don't know if using the code above behind a command button on the parent form will or will not save the column widths to the embedded subform.
One solution would be to re-initialize the column widths in the OnLoad event of your datasheet. You could then open the form with acHidden, and in the OnLoad event, set the column widths to their correct values (you'll want to multiply inches times 1440 to get the twips value to assign to the column width properties), and at the end of the OnLoad, set Me.Hidden to False.
But that is, indeed, something of a pain in the butt.
I'm afraid it's one of the downsides of using datasheets, since there's no way to define a close command button that won't save end-user UI data.