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 Replies
ADVERTISEMENT
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
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
Nov 23, 2005
I have a DB with 20 forms. All of the forms are closed. I opened a new form and added a button. I would like to do the following when the button is clicked:
Check the "Tag" property of each form and count whichever is not null.
Can anybody help me out??::o
View 1 Replies
View Related
May 25, 2015
I've saved a form to an text file to investigate a corrupted form issue. The output text file has below extracted text. I am wondering where I can find the TOP, RIGHT BOTTOM property of the form in design time? I could see some properties such as GridX, GridY, but not sure where are TOP property.
Version =20
VersionRequired =20
Checksum =-1566200859
Begin Form
RecordSelectors = NotDefault
[Code] ....
View 3 Replies
View Related
Dec 31, 2013
I'm running Access 2003 and my question relates to delivery notes that are produced for drivers as reports. These delivery notes have a blank payment box for the driver to complete if the customer pays upon delivery.
As more and more customers are prepaying by credit cards, I'd like this payment box to be automatically filled with a "PAID" text which will let the driver know the order has already been paid for.
The delivery note is produced from an "Orders" table which has a "Paid" field whose value is automatically set to "Yes" when the order has been paid for.
I was hoping to be able to place a "PAID" label on the report which is only visible when the Paid field of the underlying query is Yes.
As things are at the moment I cannot see any way to put any conditional statement onto this Text/Label. The only options for the "Is Visible" property of the text are Yes or No.
View 4 Replies
View Related
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
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 1 Replies
View Related
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
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
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
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
Oct 3, 2014
Is there any way to name the text box like "Contract (1)" I can write it this way but it is recognized as Me.Contract_1_.
I need to name it Contract(1) as I have to run some iteration in VBA.
View 4 Replies
View Related
Aug 29, 2012
When loading a form often some of the text is missing, headers are not there and/or the colours for the background are simple white, until I either resize the form or scroll up and down a few times.
View 1 Replies
View Related
May 3, 2006
Hi there,
I know there have been a good number of questions about visibility in forms already but I couldn't find a solution to my problem (or maybe I just didn't get it).
Basically, I have a tabular form (more than one record displayed at once) and one the field is of the Yes/No type. For each record, I'd like to have a text box that displays 'pending', set as visible if the field value is 'Yes' and set as invisible if the field value is 'No'.
The table is as follows:
id : auto-number
Flag: Yes/No [Yes]
If I use the following code on the Flag button:
Private Sub Flag_AfterUpdate()
Me.pending2.Visible = Me.Flag.Value
End Sub
all the 'pending' text boxes appear and disappear together (instead of just the relevant one).
I thought of using another text box, with the same data source ('Flag') but which would set itself to visible or invisible wrt to its own value but I couldn't find a way to do it.
Any suggestions ?
Thanks in advance !
and many thanks already for the forum and the contributions - it's been extremely helpful, esp. for a beginner.
View 2 Replies
View Related
Mar 27, 2006
Hiya
I'm trying to get a check box to be visible/enabled on Tuesdays, Thursdays and Sundays.
I've been dabbling with the code and 'DatePart' but with little effect. I've been trying other suggestions on other threads but am still struggling I'm afraid.
All help much appreciated, and I'm fairly new to access and have a large work objective to cope with, see below for my poor effort so far
Private Sub Datapulse_Enter()
If Datapulse = DatePart("1", "3", "5") Then
Datapulse.Visible = False
Else
Datapulse.Visible = True
End If
End Sub
View 14 Replies
View Related
Jun 16, 2005
Hi,
I am having a mare trying to do something which I think should be quite simple, as follows.
In a table I have the field [Entitled]. On my form I have this as a yes/no check box.
I have the following code in the VB.
Private Sub Check112_AfterUpdate()
If Me![Check112] = True Then
Me![Entitled].Visible = True
(or I could use) Me![Entitled].Enabled = True
Else
Me![Entitled].Visible = False
(or I could use) Me![Entitled].Enabled = False
End If
End Sub
Some people have the field checked and others do not.
The problem is; when I check or uncheck the box on individual records shown on the form, the value is remebered when I scroll to the next record (i.e. the box may be unchecked but the field is still visible/enabled). It is doing my head in! Help Please.
Mac
View 3 Replies
View Related
Sep 25, 2013
I'm trying to check if a subform is visable. The following code is just test code so I can get a result. I keep getting an error on the .IsVisible section.
If datTimePlus15 <= datCurTime And [frmBarstockAreaSubForm].IsVisible Then
MsgBox datTimePlus15 & " " & datCurTime
datTimePlus15 = DateAdd("n", 1, Now)
End If
View 2 Replies
View Related
Feb 1, 2014
I cant change the table property to number only so is there an afterupdate code I could run on a field and check for alphanumartic charters ?
View 1 Replies
View Related
Apr 18, 2014
I was wondering if there was a way to use check boxes in a form to have certain text print out. It's part of an invoice type form and there are 4 different treatments that could have been part of the appointment and the goal is to have a way to check the treatments for that appointment and only have the checked ones print out..
View 1 Replies
View Related
Jun 23, 2015
I am using Access 2007 and 2010. I would like a text box (or label) on a report to autofil using fixed text from a label on a different (closed) form.
View 8 Replies
View Related
Feb 26, 2006
Hello. In my table there is a checkbox column. This box is checked on a form which feeds the table. I run reports from queries which contain both checked results as well as unchecked results. Is it possible for on the report, for the text (the field name, not the checkbox) to only appear when the box is checked? I hope I'm explaining this properly. I want the checkbox title to only appear on the report when the box is checked, otherwise I don't want it visible.
Thanks for your help.
View 6 Replies
View Related
Aug 18, 2005
got 2 radiobuttons and i want the text further down the page to show or not show depending on the value on the radio buttons.
I have tryed making an IF, but it doesnt want to update when i change post, or when i start the form, the radio button get the correct button according to the table but the text wont show any way untill i reclick the radiobutton.
dont know if u got what i ment but if u didnt ill try to explain it more.
View 8 Replies
View Related
Jul 31, 2005
I have a db I use for maintenance of equipment. I use a main form that has the equipment listed and a sub for for spare parts and linked by equip #. In the sub form I want to turn the visiblity of a specific text box turned on based on what is in a keyword textbox field in the sub form. What syntax would be the best to use and where do I put it. Have used if me.keyword = motor then me.hp.visible = true and also tried a case statement
View 6 Replies
View Related
Apr 10, 2014
I am studying a book trying to learn vba and in the book it says, "To clear the text box of all contents, simply assign an empty string, also known as empty quotes, to the text box's Value property.
Example:
Code:
me.text1.value = ""
where would I actually put this line of code since I cant seem to find the value property in the property sheet of the text box?
View 3 Replies
View Related
Aug 27, 2006
Hi, I have a form with a INFO button, what I need is when the info button is pressed a text box becomes visible on the form and when pressed again the text box become not visible, this will allow the final user the have additional information regading compiling the form etc!
Thanks
Marco
View 5 Replies
View Related