Hide Controls On A Form
Feb 27, 2006How do you hide the canned record scrolling keys on the bottom of a Form? I have placed my own controls and do not need them to confuse the Operator, or cause problems.
View RepliesHow do you hide the canned record scrolling keys on the bottom of a Form? I have placed my own controls and do not need them to confuse the Operator, or cause problems.
View Replieshow to hide all form controls at once like if i have many text box and labels how to make a loop to hide it all at once
View 1 Replies View RelatedI've searched and can only find information setting the visible property when selections are made on an open form--I want to set the visible property when the form is opened depending on which avenue the user chooses from the navigation form.
I have a navigation form (Form A) and a second form with a subform (Form B). The user will choose from a combobox, either an existing record or a new record on Form A. On Form A there are two buttons, one that will take the user to the correct record on Form B for editing and one that will open to a new record on Form B. Once Form B is open, all controls will be blank (if a new record is chosen) or with certain controls prepopulated if an existing record is chosen.
What I want to do is to hide controls on the main form (not the subform) of Form B if the user chooses an existing record. Form A's buttons work correctly to open Form B right now. I want to be able to hide prepopulated controls on Form B if the user chooses an existing record from Form A.
Here's the code I'm using to open Form B to an existing record. I'd like to set the visible property here if at all possible.
NOTE: "Form A" and "Form B" are not the actual names of my forms--it's just easier for illustration purposes here in my question.
Private Sub cmdAddLogEntry_Click()
DoCmd.OpenForm "Form B", acNormal, , "Activity_ID = " & Me.cboINum
DoCmd.Close acForm, "Form A", acSaveYes
End Sub
I have a checkbox that determines whether or not to display certain form controls. How can I also hide the resulting white space that comes from hiding the form controls?
Can I put all of the controls in some sort of container and hide the container? The form objects are all displayed in order, so it shouldn't cause issue.
Can I create a subform for the objects and hide it? This would make the main and subforms based off of the same table.
Occam's Razor would be the preferred philosophy in this case. Nothing too fancy is needed.
Hi all, I have been given a database from a small business who just want some menial report editing. Their problem is the supplier of this simple access database has disappeared and in over a year of reporting the problem has not resolved it.
The database is locked interface-wise, i.er. if you load you cannot access tables, queries, reports etc. I was wanting to know how you do this. If the database is passworded I have a revealer, but actually getting to the edit area seems to be the problem at the moment.
Thanks for any help you can give
I have this code that works. I have a form with 3 tabs. When I select the middle tab I am prompted for password but if I click the 3rd tab I am not.
Code:
Private Sub TabCtl9_Change()
Dim strInput As String
Dim ctl As Control
' Hide controls on tab until correct password is entered
For Each ctl In Controls
[Code] .....
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.
View 2 Replies View RelatedI have a subform which lists a set of records. In the footer section of the subform, I have a number of controls which display calculations based on the records present.
The number of records in the subform will change (reduce). Basically, this is a review / approval function, the idea being that each record will be checked and approved, which will then remove it from the list.
So eventually, all of the records in the subform should disappear (the subform is requeried each time the user approves a record)
I want to be able to hide the controls in the footer section once the subform has been cleared of all records.
But not sure
a) how to determine when the subform's recordset reaches zero and
b) what event to use to fire the code to hide the footer controls.
This is my basic attempt :
Code:
Private Sub Form_Current()Dim ctl As Control
For Each ctl In Me.FormFooter.Controls
ctl.Visible = Not (Me.Recordset.EOF)
Next ctl
End Sub
But it doesn't work (it only seems to fire when the subform is loaded, not when it is requeried after each approval?)
I've tried Form_Query, Form_DataChange and Form_DataSetChange but no joy with those either.
how to make my form controls change size / position as my form is resized / loaded on a computer with a different resolution. Several of the tutorials out there suggest putting code on the "on resize" property of the form. When I looked at the Northwind database to try to mimic their code however, it looks like they must be doing something different as there is no on resize code under the form properties and I was unable to find the code they do use.
View 4 Replies View RelatedI am trying to open a form in design mode and add controls, this i have done. I am doing this all in a class, and am having trouble saving the modified form.
I have tried using the following, both produce errors
Code:
DoCmd.Save acForm, "tmpQueryDes"
DoCmd.Close acForm, "tmpQueryDes", acSaveYes
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.
Hi guys,
please give me some directions.
Recently I designed a form with several controls including both TextBox and Combox. Before I submit data by clicking the button, I use VBA to validate the values of those controls (textbox and combox). If the value is not valid, the system will eject a msgbox and automatically set the focus on that component. In order to tidy the code, I use a GoTo statement, which refers to a group of code to display the message due to the value of parameters
But it seems VBA doesn't recongize the control I set through the parameter.
The code as the following:
private function validation () as boolean
Dim ErrorMessage as string
Dim ErrorComponent as String
......
ErrorMessage="Please select the shop Name"
ErrorComponent="ShopName" // ShopNameis a combox
GoTo ExitFunction
.....
......
ErrorMessage="Please set the start date"
ErrorComponent="StartDate" // StartDate is a Textbox
GoTo ExitFunction
.....
ExitFunction:
msgResult = MsgBox(ErrorMessage, vbOKOnly, "Error Message")
Me(ErrorComponent).SetFocus
validation = False
Exit Function
=============
As I tested for seveal time, I'm sure there is something wrong with
"
msgResult = MsgBox(ErrorMessage, vbOKOnly, "Error Message")
Me(ErrorComponent).SetFocus
"
but how can I fix it?
Many Thanks
I am new to Access and have not used VBA.
I have searched the forum on this, but I can't find an example of this problem.
I have a data entry form with a two-page tab control. One is for company info and the other for contact info. The recordsource is a query based on the two tables. Initially I had the page set up as a rather large form with a subform and decided to convert to the cleaner looking tab control (I used copy and paste to transfer the controls).
This form worked initially, but now I have changed some setting so that it doesn't work anymore: I can enter data properly on the first tab, but not on the second.
I have tried changing the various form properties but I must be missing something obvious. All my tab-less forms work the way I expect them to.
What I don't understand is why one tab works and not the other.
I have one main form with 3 tabulated sub forms.
My main form consists of two fields.
When the user clicks tab 2 (subform 2) or tab 3 (subform 3) the main fields should hide
I tried to achieve this by using the on click event at the tabbed forms. I referenced the two main fields and used the visible property followed by a form requery. It didn't work.
thanks in advance
Hi.
I was just wondering if you can hide a form in the windows status bar?
Hi, I have a form with a cmd butto that unhides a text box, this text box is quite big on the form and I want it to display extra informations, the problem I have is when I unhide the textbox this will appear under fixed fields on the form, I need this text box to appear over everything over the form, Hox can I achieve it?
Thanks
Marco
hello everyone,
I have a database that has only two tables and one form. There is about 100 people that will be using this system(not all at the same time), and I want to hide everything from them except the form, including the microsoft access window behind the form. if i just make the access window small and put it behind the form, that looks alright, but i don't want to have to go to everyone's computers and do that! i've already hidden everything else, i just can't figure out how to make it seem like it's a stand-alone application. Any ideas???
Thanks very much in advance
*j
Hi guys,
I would like to create text boxes using VBA code ....the reason is that I need a number of text boxes to be created that is equal to the number of rows that is generated by an SQL query.
Any suggestions?
Tnx!
I created lots of controls on my form, and now i cannot create anymore. I do not know what the problem is... I just get an error message that says:
"MS Office Access cannot create any more controls in your form/report. If you have deleted controls from this form/report in the past, try renaming the form/report and then add more controls to it"
I tried renaming the form already. it didnt work :confused:
I tried to create a new database (i copied all the tables, queries and forms into the new database). it didnt work.
I dont know what else to do... Please help
I would dearly appreciate any help. Thank you in advance :)
I have few forms that look fine when in Design view, but which appear as plain grey screens when opened in Form view. These were working perfectly (i.e. visible in both views) until about half an hour ago.
The only things I have changed are some of the calculations behind certain fields.
Any thoughts?
I have a number of list boxes that dont show up in the VBEditor under the form name.
To be more specific, these controls do not show up in the drop-down list on top of the code window. If I try to assign an event procedure through 'code builder' to these controls, they refer back to a pre-existing module instead of the form under "Access Class Objects".
I have tried repairing and compacting the database to no avail. Can someone guide me? Please ask for more info if you would like some.
Thanks in advance.
Hi,
I have a rather simplistic problem that I can't find a solution to! I have a
form that I want to maximize every time it opens (which I have achieved
through DoCmd.Maximize in the Form_Load event), but I also want that all the
controls in the form, staying positioned relative to each other, center
themselves horizontally on the form once it is resized. Maybe I can set a
property that always makes them stay in the horizontal center, which is also
great. How could I accomplish this?
Thank you!
Kriti
Hi,
Does anyone know how to add controls to a form, dynamically??
I m trying to create a form with tab controls but it keeps on disappearing in the form view but showing up in design view. Even when I delete the tab control and drag existing fields onto a blank form it is still not showing up in form view but showing in design view.
View 2 Replies View RelatedHi,
I want to hide a sub-form borders, so when I run it it just shows what's inside it e.g. textboxes, labels....etc
I fiddled around with the properties, but no luck.
Any help will be very much appreciated.
B
What I need to do is, not have a form pop up when all the conditions are met. I have 30 some users that log into the db.
I have a form that pops up when the date of the project is past due. to certain users when they log in. I am using the Environ("username") theory, which works very well. But when the user has COMPLETED all the necessary dates, the form still comes up, (but of course it’s blank).
How can I eliminate that problem?