Forms :: Hide Controls When A Form Is Opened Conditionally

Oct 7, 2014

I'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

View Replies


ADVERTISEMENT

Forms :: How To Hide All Form Controls At Once

Apr 21, 2013

how 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 Related

Forms :: Hide Form Controls And Resulting White Space

Sep 20, 2013

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.

View 4 Replies View Related

Hide Controls On A Form

Feb 27, 2006

How 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 1 Replies View Related

Forms :: Hide And Show Controls Based On Value In Combobox

Apr 22, 2014

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 Related

Forms :: Refresh Form That Is Already Opened

Mar 17, 2013

I have forms that show commitments by Client, by Cost Centre, by Provider etc.

If I add new commitments or edit commitments it is done through the Commitments by Client form, as all other forms lead back to this one.

To create a new or edit an existing commitment, it is done through a Commitment Form, which goes into a query (query A)which does all the calculations. My client form has subforms based on Query A, however my other forms (commitments by Cost Centre etc) have subforms which have querys that are based on Query A . I hope that made sense.

My problem is that If I edit a commitment, the client form and subforms refrlect the changes imediately, even though they are open and I can see them changing when I change the commitments. However the other ones don't unless I close them and re-open them.

My navigation within the database is based on once a form has been opened it is set to be invisible untill called on again (i.e. visible = False).

How to requery all the forms without having to close them.

View 1 Replies View Related

Un-hide Access Controls

Jul 6, 2006

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

View 1 Replies View Related

Forms :: Access Form Must Be Opened In Design View Before Use

Oct 1, 2013

I have a access form that has a text box that holds a search term. The search term is used as a variable in a query. The query results populate a list box. Selecting a result in the list box populates the rest of the form where the record can be edited. All of that works great...sort of. When first opening the form you cannot view any records. The search function works fine and the list box populates but selecting a record does not populate the rest of the form. Attempt to navigate (next, first, etc.) and you get a "You can't go to the specified record" dialog. There is a simple fix for this. Open the form as normal. Then switch to design mode. Do absolutely nothing. Switch back to form mode. All is well.

View 1 Replies View Related

Forms :: Macro To Close Report And Opened Form

Mar 10, 2015

I am using MS Access 2003.

I would like to open the form = VendorPayables_Maintenance_F
Choose a cheque number
Print the cheque

How to create a macro to
close the open report = d_One cheque information
and close the open form = VendorPayables_Maintenance_F

View 2 Replies View Related

Modules & VBA :: Hide Controls On Tab Until Correct Password Is Entered

Jun 22, 2013

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] .....

View 8 Replies View Related

Forms :: Access 2007 - No Records Shown When Continuous Form Is Opened

Dec 21, 2014

IN Access 2007 when a Continuous form is opened there is no records shown.

Only after hitting the page down records are shown.

View 1 Replies View Related

Forms :: BrowseTo Opens Form As NewRecord Depending On Opened Record

Apr 2, 2015

I'm using a navigation control to switch between forms. In one of those forms, I have a continuous subform which is a list of Projects (source is a query) that is read-only. To edit a project, I can click on its name, which switches the form displayed in the navigation control via docmd.BrowseTo (with acEditForm as the last parameter). This works fine. The proper form opens, with the proper project being displayed.

Now, on this second form, I have on the right the list of tasks contained in the project in a continuous subform (source is a query), and on the left another subform which is kind of an "edit bar" that I use to actually edit the individual tasks. So, when I click on a task in the task list, the OnCurrent event triggers a docmd.BrowseTo command that updates the "edit bar" subform and passes the ID of the task as the WhereCondition parameter. This updates the values displayed in the Edit Bar to that of the selected task, which I can then edit.

Now here's the thing: depending on the project I open, the Edit Bar doesn't work. Actually, it looks like only one of the projects is working, while the others are not (and I managed to have a different project working, but only one works at any given try). When it doesn't work, the Edit Bar is in "NewRecord = True" for some reason. All the other properties of that subform seem to be the same between when it works and when it doesn't.

So, it looks like the same command (docmd.BrowseTo with acEditForm) opens the subform properly in acEditMode when it works, and in something else when it doesn't, depending on the parent record that's being opened.
This really gets me, I really can't figure out how that's even possible.

I suspect it might have something to do with locked records, maybe?

View 2 Replies View Related

Modules & VBA :: Hide Subform Footer Controls If No Records Present (AC2007)

Mar 14, 2014

I 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.

View 6 Replies View Related

Forms :: Conditionally Formatting A Drop-down Box

Apr 30, 2014

I work for a doctor, and I am creating a database to assist with surgery scheduling. There are a lot of pieces and parts to this process, and I am building a "bird's eye view" of tasks to be completed, such as "Notified OR," "Sent Surgery Packet," and "Scheduled Post-Op Appt." Each one of these fields has a lookup attached to it with three choices: "Yes," "No," and "Not Needed."

What I want is for the drop-down box with the three choices to be (a) automatically defaulted to "No," (b) immediately turn red if "No" is displayed or immediately turn green if "Yes" or "Not Needed" is displayed. In this way, the goal for our scheduler will be to get all the drop-downs to turn green (an easy visual cue that the patient is ready for surgery) by the date of the procedure.

View 1 Replies View Related

Conditionally Suppress On A Form

Oct 10, 2005

Hi all

Long time searcher, first time poster!

I have a subform which has loads of check boxes for each record but i want to suppress certain boxes depending on criteria in each record. I think i need to do a For..Each statement but, as my user name suggests, I'm buggered!.

View 2 Replies View Related

Forms :: Conditionally Using Asterisk In A Query Formed From Strings?

Jul 10, 2015

I have a button on a Form which opens a report, passing in two WHERE clauses which are driven by two comboboxes on the Form (one for ProductType and one for ProductCollection).

Everything works great but I needed to add an "All" option to the comboboxes so that the user can get all Producttypes from a specific Collection or vice versa.

I've managed to add the "All" option to one of the comboboxes (using the UNION query method on the rowsource). I'm a bit stumped though, as to how I would actually tweak the function below to do a select * where the combobox value is found to be = All.

Code:
Private Sub ProduceReport_Click()
Dim strWhere As String
strWhere = "producttype = " & Me.ProductTypeForReport
strWhere = strWhere & " AND ProductCollectionName = '" & Me.CollectionForReport
strWhere = strWhere & "'"
Debug.Print strWhere
DoCmd.OpenReport "Products Report", acViewReport, , strWhere
End Sub

View 7 Replies View Related

Forms :: How To Ungroup Controls On Form

Apr 29, 2014

I had never seen this before as I have recently moved from 2003 to 2010. When I create a from using the wizard sometimes the controls are grouped (inside a dashed square) which does not allow me to modify its size and/or position independently.

How can I "ungroup" these control?

View 2 Replies View Related

Forms :: Repeating Controls In A Form

Jan 7, 2014

I have a form that uses VBA codes to write all the info from the controls in the form into different relational tables. I was stopped at the point that I wanted to have repeating controls. Collect multiple instances of the same type of data, such as in the case of writing many people's Name, Age and Specialty in the Employees table. How do I do that? What is the VBA code for this task?

View 1 Replies View Related

Forms :: How To Format The Form Controls

Jun 27, 2015

Which option in property window is responsible for group lining up of some controls vertically? how to ungroup them to allow resize one individually. I could not also find option in menu for removing pre-formatting of those controls.

View 3 Replies View Related

Forms :: Same Form But Different Controls Per User

Sep 19, 2014

Is it possible to have a form and dependant on the security level of the user, will depend on what control will appear?
Or can I have the controls there and lock them to a user?

I have a DB of staff directory and I want to lock it so users can only view information, supervisors can edit and admin have full control.

I've done it so far by creating a different form and controls for each level but it a lot of work and queries. Is there a simpler way to do it?

View 6 Replies View Related

Forms :: New Controls On Form Are Not Responding

Jul 28, 2015

my form consited of 4 pages and controlled by query (joined 2 tables). I added a new table to the query and another page to the form . This page contains several controls (option, check boxes, combo boxes, text boxes) with source - fields of a new table added to the query. None of the controls on the new page respond.

View 5 Replies View Related

Forms :: Form Coding For Controls?

Aug 11, 2014

I have a form (see attached) and every time someone goes to a different field I would like to change the border to red and when they leave that field to change the border back to the default color. I know I can put the code in for each fields got focus and lost focus section but would rather be able to put the code in once and for it to work for all the fields.

View 12 Replies View Related

Forms :: Conditionally Change Back Color Based On Value Of A Control

Mar 15, 2014

How do I conditionally change the Back Color and Alternate Back Color based on the value of notes.FollowUpDate? I have a continuous form using the following code:

Code:
Private Sub b_all_past_Click()
Me.resultsFrame.SourceObject = "FollowUp_bystaff"
Me.resultsFrame.Form.RecordSource = "SELECT * From notes WHERE (((Notes.FollowUpDate) < Date()+1) And ((Notes.followup_person_id) = GetCurrentUserId()))ORDER BY notes.priority,(notes.FollowUpDate) DESC;" '
End Sub

View 1 Replies View Related

Forms :: Possible To Hide Field In A Form?

Jul 31, 2013

Can you have a hidden field in a form? Trying to set up an order process system where I need to take a wholesale price of an item then mark it up (behind the scenes) and display only the customer price. How can I accomplish this.

View 4 Replies View Related

Forms :: How To Hide Fields On A Form

Sep 10, 2013

I am trying to hide certain fields on a form based on the value in another field (if yes or no). I used the change event to enable/disable the fields in question. however, this doesn't work. This is the code below...

Private Sub Combo314_Change()
If Me.Combo314 = "Yes" Or Me.Combo314 = "No" Then
Me.Reason_Label.Visible = False
Me.Combo316.Enabled = False
Me.Label946.Visible = False
Me.Label77.Visible = False
Me.care_not_qualified_date.Enabled = False

[code]....

View 4 Replies View Related

Forms :: One Form Controls Affects All Records?

Jun 25, 2013

I have a form where you enter a Case number (Primary key) and EmployeeID (foreign Key), the employeeID must match a employeeID held in the employee table. Within this Case form, I have a subform called Account which has an autonumber Primary key called accountID. Each of these accounts will have a questionnaire. So I created the questions in the same table (account). So Q1, Q2, Q3 etc. which are Questions relating to each AccountID, one accountID can have one questionnaire.

What is working fine is I can enter an account NUMBER which is a field in my account table (which creates a new AccountID(autonumber)) and can happily check the checkbox, fill out the text fields move to the next record and the checkbox is unticked and text boxes are blank (default state) which is great as I want them to ready for new input (new accountnumber/id).

My problem is assume I create my very first account number which would be say AccountID(0), I want all textboxes for the three questions disabled until the checkbox is ticked. So thats ok, I can put the default value of chkbox to FALSE, and in VBA I can do the on_checkbox_click, if chkbox.value = true then textbox1.enabled = true else textbox1.enabled = false. I can do that for the other two textboxes in the Chkbox click event.

When I Tick the checkbox it enables the textboxes, which is good, but when I create/move to the next record, instead of these textboxes being disabled as default, they are enabled because i ticked the chkbox for the first record. I dont want the manipulation of one AccountsIDs questionnaire to affects the other records. If I add an unbound textbox which I want to display a message if the chkbox is ticked, then if I tick it on one record, it has the displayed message on all records. How can this be if each questionnaire is independently i.e each questionnaire is for ONE accountID.

It seems the textboxes etc are not unique to each accountID but they should be because they are in the Account table and when I enter values and use the checkboxes without doing the disabling or showing a textbox comment, they are separate and work great, but when I use my code to manipulate the flow of a questionnaire for each account i.e enabling textbox/showing textbox comment, it changes the formatting on the other records questionnaire which I don't want as each questionnaire will be different, so a chkbox may enable a question on one ID but not on another as it wont be relevant, so at the moment I only have ONE truly working questionnaire which works for ONE account , but I want it to work uniquely for each account.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved