Resetting The Visible Property On Fields

Mar 2, 2005

I have a couple of fields on my form (Resolution Type, Date Closed) that I want to display only if the Status field has Closed as its selection for each record. I initially set the Visible parameter of both the type and closed fields to False and I reset them to visible by checking for open/closed with an afterupdate event. This works great for the first record but...subsequent entries display those 2, regardless.

I know just enough regarding events to struggle my way through on some things but more advanced field, record level and form level events are beyond my experience level.

Can anybody offer any advice on how to get those two fields to toggle visible/invisible when scrolling through the records?

With that said, does anyone have a link to a post/website referencing this subject?

Thanks in advance,

Mike

View Replies


ADVERTISEMENT

Reports :: Changing Visible Property Of Blank Image Fields In A Report

Dec 8, 2014

My student is doing a project on question paper generation in which he selects questions from each lesson needed and also some of these questions have images associated with them. So, if these questions are selected, the image control in the report displays it.

If there is no image, the space for the control is left in tact. I tried changing the visible property for the image control in the Detail_Format event procedure. But this code is not reached at all and the space is still left. I am not storing the image directly in the field but its path in a text field.

I want that the space occupied by the image control removed. I tried the suppression thing but obviously it did not work.

View 6 Replies View Related

Subform Visible Property

Aug 5, 2005

I have a form with a subform on it, if the user clicks a control on the subform I want to set the subforms visible property to = False.

I have tried Me!Subform.visible=False and Form!Subform.Visible=False but neither are working, I think i have to set focus back to the main form before I can set the visible property of the subform.

View 2 Replies View Related

Set Form's Visible Property To False

Feb 17, 2005

This seems really straight forward to me. I have 3 forms - FormA, FormB and FormC. When I open FormA the user inputs some information, when they tab to the last field, FormB opens (which I want to be invisible) and Form C opens.

I've tried putting this coding on the Open event of FormB:
Me.Visible = False

I've also tried putting this code on the Open event of FormC
Forms!FormB.Visible= False

Neither work. My form (FormB) still displays when eithr event occurs.

Any suggestions?

Cindy

View 6 Replies View Related

Label Visible Property Problem

Mar 30, 2005

Hi
I have a form where the processing is a little slow and I want to advise the user that something is actually happening!
So I put a label on the form (lblWait) with a suitable message. The visible property is set to Yes.
On the form open event I put
Me.lblWait.visible = False
This makes the label invisible as expected. On the code behind the run button I started it off like this
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset

' Reveal wait message
Me.lblWait.Visible = True

' Delete any extant records in tblTmpReportDates
cnn.Execute "DELETE * FROM tblTmpReportDates"

However, my wait message stays invisible throughout the whole process. All the other processing goes fine.
I sense I am either using the wrong procedure to put up a wait message but shouldn't this work?
Any words of wisdom would be most appreciated, especially if they solve the problem!!
Thanks in advance and best wishes

View 2 Replies View Related

Visible Property Coding Problem

Jun 18, 2005

I have a form that I use to both add new records and edit existing ones. I do this thru a combobox and two command buttons. One button opens form in add records mode with combobox visible property set to no. The other button sets the visible property to true. I am getting an error message that "the field combo60 can not be found" Here is my code:
Private Sub Label63_Click()
DoCmd.OpenForm "frm_Client Information"
Me![Combo60].Visible = True

End Sub
The name of the combox is right. Can anyone help?

View 2 Replies View Related

Updating Label Visible Property Not Working

Dec 7, 2006

i am running a query that takes few seconds to run but during that time i want my label to say "please wait'' so when the form loads i have it as:

lblstatus.visible=false

and when the user click on generate report that runs teh query i have as:

button_click starts
lblStatus.visible=true
button_click ends

but guess what, this doesnt work!! looks like the screen is not updated until the button_click processes, if i add a msgbox() after lblstatus.visible=true it shows but after the msgbox which i dont want. anyone know why?

View 1 Replies View Related

Want Check Box On Switchboard Form To Set A Text Box's Visible Property In A Report

Sep 23, 2004

On my switchboard form, I have a check box which the user can check to make a text box (which appears in several different reports) visible and uncheck to make it invisible. The text box in the reports has the same name on all of them.

I am having trouble making this work.

I can think of two solutions, but haven't had success with either yet.

1. I could simply change the visible property of the report(s) control from the form. This works if the report is open, but throws an error if the report is not open.

Code:Public Sub showNumOrgsInReportCB_AfterUpdate()If Me!showNumOrgsInReportCB.Value = 0 ThenReports![publishZipR]![numOrgsF].Visible = FalseElseReports![publishZipR]![numOrgsF].Visible = TrueEnd IfEnd Sub

Is there a property or function I can use to test whether the report is open before I set the text box visibility?


2. Alternatively, a less elegant solution would be to run an event procedure to close all open reports. This would eliminate that issue, but I haven't gotten the code to work yet:

Code:Public Sub showNumOrgsInReportCB_AfterUpdate() Dim rpt As Report ' Enumerate Reports collection.For Each rpt In ReportsDoCmd.Close rpt.nameNext rptEnd Sub

This line:
DoCmd.Close rpt.name
throws a Run-time Error '13', Type mismatch.

How do I fix that?


I'm open to better ideas!

Thanks

View 2 Replies View Related

Reports :: Change Specific Subreport Visible Property Base Of A Select

May 6, 2015

I have stumbled across an issue in my report involving the Report.SourceObject property. The section of the report contains a subreport that needs to change dynamically to display the report that relates to the corresponding test. When trying to change the subreports.Sourceobject property I get the error Run-time error 2191: You cant set the Source Object Property in the print preview or after printing has started.This is very clear to me what the limitation is, however I was wondering if there was some way around this.

I have currently tried creating multiple subreports that are stacked on each other with visible property set to false. Then I change the specific subreport visible property base of a select. This worked, but was extremely hard on the machine and printer as there is about 15 different possible subreports.

Secondly I have tried exporting it to RTF and just manually copying and pasting the tables. The down side with this is all the formatting and work I have put into the report as a whole goes out the window so if possible would like to avoid this situation as well.

View 8 Replies View Related

Choosing Fields From Combo Box To Make Fields Visible

Aug 30, 2004

I have a combo box linked to a look-up table. There are 8 fields in the look-up table but only if one of three is chosen do I want additional combo boxes to become visible. Do I put the code in the "after update" or "on change" event of the combo box and how do I express the code-

If TechniqueCombo="caudal" or "spinal" or "epidural" then
TextNeedleType.Visible=True

(am I close??)

Thanks

View 4 Replies View Related

Modules & VBA :: Export Visible Fields Only To Excel

May 15, 2014

I have a query tool that allows users to create their own custom queries. Basically, it's a form that allows the user to check boxes for the fields they want to see. The code behind it simply hides the fields in the query for which the user has not checked the box. That works very well.

My problem is I would like to have a command button that will export the query to excel. The OutputTo and TransferSpreadsheet commands will just export the whole query into excel regardless of whether or not the field is checked. I'm looking for a way to only export the columns the user has checked. Is this possible, and if not is there a workaround that would do something similar?

View 7 Replies View Related

Report Fields Visible Based On Checkbox

Sep 20, 2011

I have an Access 07 report, and when viewing the report I'd like to have some checkboxes visible based on their value. In other words, I need the checkbox to be visible if it's checked and not visible if it's not. I have the following in the OnLoad event of the report;

Me.Checkbox.Visible = Me.Checkbox.Value

This works fine in print preview but makes no difference in normal view, the checkboxes are visible regardless of value. I'd like to keep normal view if possible.

View 2 Replies View Related

Queries :: Using Filter Property With Multi Valued Fields

Dec 4, 2013

I have a subform query which includes EventName, Date, and Tags. Tags is a multivalued field.

What I need to do is allow people to filter this subform using the inbuilt filter, and then use the filtered data to populate a graph.

I am doing this by taking the Filter property from the form and then using VBA to build an SQL statement with the right data, and using that on the graph. It works fine when people filter on the EventName and Date fields.

However, when someone filters the Tags field, it fails. The filter property gets set to something along the lines of

([Lookup_Tags].[TagName]="whatevertagtheypick")

This syntax seems not to be supported when I put it into the SQL statement.

View 1 Replies View Related

Modules & VBA :: Toggle Fields To Get Visible Based On Button Clicked

Oct 31, 2014

I'm quite new to Acces (2010) . Currently, I'm working on a form in which certain fields are set to invisible. I'd like to toggle fields to visible based on the button clicked.

Example:
Field 1: O No O Yes --> When No is clicked Field 2 (containing a date) becomes visible
--> When Yes is clicked Field 3 and 4 (both yes/no fields) become visible

View 5 Replies View Related

General :: Add Existing Fields And Property Sheet - Buttons Not Working

Sep 1, 2014

I have a problem with two buttons, add existing fields and property sheet

When i click them they do nothing at all, so i cannot do what i need to do?

View 9 Replies View Related

Forms :: Visible / Non-visible Combobox - Column Attribute?

Oct 17, 2013

I have a combobox on my form called TypeOfBusiness, with fields including Corporation, Education, Industry, Non-Profit. In order to make a second combobox called IndustryClassification appear when Industry is selected from the TypeOfBusiness combobox, I have used the following code:

Code:
Private Sub Form_Current()
If Me.TypeOfBusiness = "Industry" Then
Me.IndustryClassification.Visible = True
Else
Me.IndustryClassification.Visible = False

[Code] .....

It works just fine. However, when a user selects both, say, Industry and Education, the IndustryClassification combobox will not appear. What code I can use to ensure the IndustryClassification box will appear regardless if another box is checked in addition to Industry? I am wondering if it has to do with the Column attribute.

View 14 Replies View Related

Modules & VBA :: Make Controls Visible Or Not Visible?

Mar 24, 2015

I have a Main Form with a Sub-Form, the sub-form is base off a query. on the sub-form i have 8 controls, one of them is "Status' and "Process" and "Review" My Main Form have a Refresh command that refreshes the data in the sub-form.

What i am trying to do is make the "Process" Control only visible is "Status" is a certain status and "Review" visible if "Status" is something else. what i have done works correctly On Open. I run into and issue on the refresh command. I get Run-time error '2165' "You can't hide a control that has the focus"

Code:
If Forms!Main_Form.[Name subform]!Status = "Ready" Then
Forms!Main_Form.[Name subform]!Process.Visible = True
Forms!Main_Form.[Name subform]!Review.Visible = False
ElseIf Forms!Main_Form.[Name subform]!Status = "Reviewing" Then
Forms!Main_Form.[Name subform]!Review.Visible = True
Forms!Main_Form.[Name subform]!Process.Visible = False
End If

I have done similar with a main form and making sub-form visible or not based on a control on a main form and that has worked perfectly. I am not sure how the control is getting focus and cause the error.

View 4 Replies View Related

Visible.Enabled Remaining Visible!

Sep 12, 2004

I have a form with four subforms set up in a tabs on the form. In the subforms I have a copuple of command buttons which enable/make visible fields when they are clicked (see previous posts but for eg) - if a height and a weight are added in two separate boxes a calculation is done and then a command button pressed to make visible the (label) which shows the mass index the patient falls into. My problem is that the label is then retained so if I click out of the form and re-enter with a new patient then the height and weight boxes are clear but the label from the previous patient remains.

I tried to put the code
Private Sub Form_Load()
If PtWeight = Null And PtHeight = Null And Text60 = Null Then
Label106.Visible = False
Label101.Visible = False
Label177.Visible = False
Label122.Visible = False
Label123.Visible = False
End If
End Sub
in both the open and on load event of the main form (not the subform) but it doesn't help. Any ideas?

(When should code be put on the main form and when on the subform?)

View 2 Replies View Related

Resetting Forms

May 3, 2006

Hi there gurus...

I have made a form with various text-boxes, radio-buttons and other controls on it. The form is not bound to a table or query: I'm just using the form as a data-gathering device for my VBA code. After the user has entered the data I want to use a button to reset the boxes and controls to the way they were when the form was openened, ie as though the user closed the form down and re-opened it again. I know I can do this by resetting the .value of each control back to its default, but there's about 30 controls to reset! Is there not something like "forms!main.reset" that just resets all the controls a form back to their default values, clears out text boxes, etc etc as though the user has closed & reopened the form?

Ta
John

View 12 Replies View Related

Autonumber Resetting

Oct 11, 2005

here the scenario:

i have a page displaying all the contents of my table with the first field a autonumber as a button on the page.

when i click the button, (Ex. number 15) it brings me to another page where i can delete the clicked entry.

after deleting, i go back to the viewing page, because i deleted number 15, it now shows, 1,2,-----14,16,--- so on so forth.

how can i reset the autonumber so that when i go back to the viewing page the numbers are in order again?

hope u got my point. thanks for any help u can give.

View 3 Replies View Related

Resetting AutoNumber Field???

Sep 15, 2005

could someone please tell how i can reset an autonumber field to start from 1.

basically i have created a table and carried out a number of test with useless data. now that i have the table set up the way i want it and i have tested the queries etc i want to delete all the current data in the table and begin filling it with correct data. however i want my primary id to start from 1 which at the moment it doesn't because i have just deleted 50 records.

thanks in advance

View 2 Replies View Related

Resetting Seed Identities

Mar 5, 2006

I have a quick question. I have a table that has a field with a seed identity with an increment of 1. Right now I have records in the table ranging from 1965001 - 1988704. Every so often the oldest records are archived off to another database. However, I have just been informed that the records from this table can not exceed 2000000 in the seed identity field. Ideally, I would like to just go into the table design view and change the seed identity to 1000001 and leave all of the existing records as they are, knowing that it will be years before it causes an issue. I've tried this in the lab and it didn't work, the seed identity issued was always 1 higher than the highest record in the table.

My plan B is to export all of the records out of the table, change the seed identity, and append the records issuing a new identity. The problem with this is that the seed identity is referenced in other tables, which would have to updated.

The easiest solution for me would be to be able to just change the seed identity and start issuing new seed identities, leaving the existing records alone.

I am no Access expert so please forgive me if my approach is way off.

View 3 Replies View Related

Resetting Autonumber Values

Jan 4, 2007

I cleared a table of records and need to restart (at one) the autonumber field. I used the instructions found on on-line help but they will not reset the field back to one. Any one have a solution. I have even deleted the field and created a new one with the same name and it started with the same value it would hav used before I deleted any records.

View 3 Replies View Related

Running Sum Resetting Each Year

Oct 17, 2006

Trying to calculate a YTD running sum by Month where the cumulative amount resets the next year as below.

AYearAmonthSumOfFreightRunTot FDate
19951$2,798.59$2,798.59Jan
19952$1,675.06$4,473.65Feb
19953$2,165.37$6,639.02Mar
19954$1,661.66$8,300.68Apr
19955$3,166.25$11,466.93May
19956$3,461.40$14,928.33Jun
19957$1,852.65$16,780.98Jul
19958$2,458.72$20,527.88Aug
19959$3,078.27$25,003.32Sep
199510$3,237.05$29,363.85Oct
199511$3,934.70$34,708.77Nov
199512$2,019.68$38,990.68Dec
19961$3,757.96$3,757.96Jan
19962$5,395.28$9,153.24Feb
19963$4,341.10$13,494.34Mar
19964$5,379.02$18,873.36Apr

Here's my practice SQL (in NorthWinds.mdb

SELECT DatePart("yyyy",[OrderDate]) AS AYear, DatePart("m",[OrderDate]) AS Amonth, Sum(Orders.Freight) AS SumOfFreight, Val(DSum("Freight","Orders","DatePart('m',[OrderDate])<=" & [Amonth] & " And DatePart('yyyy',[OrderDate])<=" & [Ayear] & " ")) AS RunTot, Format([OrderDate],"mmm") AS FDate
FROM Orders
WHERE (((DatePart("yyyy",[OrderDate])) Between 1995 And 1996))
GROUP BY DatePart("yyyy",[OrderDate]), DatePart("m",[OrderDate]), Format([OrderDate],"mmm")
ORDER BY DatePart("yyyy",[OrderDate]), DatePart("m",[OrderDate]), Format([OrderDate],"mmm");

Here's what I get:
AYearAmonthSumOfFreightRunTotFDate
19951$2,798.59$2,798.59Jan
19952$1,675.06$4,473.65Feb
19953$2,165.37$6,639.02Mar
19954$1,661.66$8,300.68Apr
19955$3,166.25$11,466.93May
19956$3,461.40$14,928.33Jun
19957$1,852.65$16,780.98Jul
19958$2,458.72$20,527.88Aug
19959$3,078.27$25,003.32Sep
199510$3,237.05$29,363.85Oct
199511$3,934.70$34,708.77Nov
199512$2,019.68$38,990.68Dec
19961$3,757.96$6,556.55Jan
19962$5,395.28$13,626.89Feb
19963$4,341.10$20,133.36Mar
19964$5,379.02$27,174.04Apr
19965$6,481.29$36,821.58May
19966$597.36 $40,880.34Jun

Anyone have an idea for correcting this problem?

Thanks in advance,

Barb

View 3 Replies View Related

Resetting A Subforms Textboxes

Feb 7, 2005

I have a Form/subform that is used to allow editing of a user selected record from a table called personnel. When the form/subform is first opened, all text boxes are blank. The user selects the desired record from a combo box that uses a dropdown list to display all records of the table. When a record is selected, the contents of that record are displayed in the subform in which the user can then edit/modify. The user then clicks on a "save button" which then saves the record.

I want to use a msgbox that will notify the user that he has just updated a record and ask if he/she would like to update another record. If the answer is NO, then close form/subform. If answer is YES, I would like to clear the combo box and the subform text boxes. then the user can them start the process over by selecting the desired record from the combo box.

When I placed the msgbox coding into the "save" button's on click property, the NO portion worked fine. However, when YES is selected, the combo box would clear but the subform texboxes still show the previous record data (does not clear).

Can anyone provide some assistance?

Here is the code for the main form:


Sub SetFilter()

Dim LSQL As String

LSQL = "select * from personnel"
LSQL = LSQL & " where last = '" & cboSelected & "'"

Form_Editpersonnel_sub.RecordSource = LSQL

End Sub

Private Sub cboSelected_AfterUpdate()

'Call subroutine to set filter based on selected last name
SetFilter

End Sub

Private Sub Form_Open(Cancel As Integer)

'Call subroutine to set filter based on selected last name
SetFilter

End Sub


Here is the code for the subform "save" button:

Private Sub SAVE_Click()
On Error GoTo Err_SAVE_Click

DoCmd.RunCommand acCmdSaveRecord
DoCmd.close
If MsgBox("You have updated information on a Detachment Member. Do you wish to update another member?", vbExclamation + vbYesNo + vbDefaultButton2, "WARNING") = vbNo Then
DoCmd.OpenForm "PERSONNEL MANAGEMENT"
Else
DoCmd.close
DoCmd.OpenForm "Edit personnel"
End If


Exit_SAVE_Click:
Exit Sub

Err_SAVE_Click:
MsgBox Err.Description
Resume Exit_SAVE_Click

End Sub

View 2 Replies View Related

Resetting Auto Number

Dec 1, 2006

I have a number of tables (I know someone is going to say you don't need a primary field for these tables but I want to use one) that are basically lookup tables for combo boxes. Generally I use an autonumber to identify the ID of each record. There are occasions when all the records need to be changed (i.e. delete all old records) - does anyone know how I can programmatically (or otherwise) reset the autonumber from the last used back to "1" if all records from the table are deleted.

Beeky

View 4 Replies View Related







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