Label Box Visible If Subform Value Is Null

Nov 1, 2004

Can i have a label appear if a value in my subform is null.

i have a report called "ModelFinalReport"

which has a subform called "ModelFinal"

And in that subform a textbox called "VAT"

i also have a label on my main form that i want to appear if the text box "VAT" returns a null value. but be invisible if "VAT" returns a true value.

how should this be written please.

Cheers

Andy

View Replies


ADVERTISEMENT

Problem Making A Label Visible In A Subform! URGENT - Please HELP!!!

Nov 16, 2005

Hi guys,

I have a form (frmMain) which contains 3 subforms and they are being set to visible at different stages of application run (depending on the options selected).

In subfrm_Main_options i have 3 buttons, clicking on 'Job Review' will make the subfrm_Search visible. In the subfrm_Search i have 2 labels, 'View Jobs' and 'View Report' and I only want the 'View Jobs' to be visible!

I have tried setting the visible property of this label to False in the subfrm_Main_Options but its giving me an error (saying the form subfrm_Search is closed or does not exist in the database!). I also tried using a Global Variable (ViewJobs - declared in module mdlPublicVars) and set it to True once the 'Job Review' is clicked in the subfrm_Main_Options form, and then look at this in subfrm_Search and then display the correct label. However after trying to put this code in various events such as, On Open, On Got Focous, On Activation, ... i didnt get the result i wanted!

Can any1 please help me out with this. I would be really grateful!

PS. The buttons appearing on the form are placed on the frmMain, I did that to see if it appears on the main form but they must be in subfrm_Search!

The database is attached!

Thanks, Maisam

View 1 Replies View Related

Problem Making A Label Visible In Subform! Continue Of Previous Post! Please Help!

Nov 16, 2005

I sent a post earlier today about making a label visible in a subform! I am still working on it but still no progress!

I have a different scenario (its the same thing but trying to explain the method i'm working on):

I have one main form (frmMain) that contains 3 subforms, say subfrm1, subfrm2 and subfrm3. On Open only 1 is visible and 2 and 3 are invisible (however they are open and loaded).

By choosing an option on 1 subfrm2 becomes available! When choosing an option on subfrm1 a boolean called 'XXX' is set to true. Now i want one particular label to become visible in subfrm2 if 'XXX' is true! To do this i need to write a code to be executed when subfrm2 is appears on screen! The problem is this form is already open so how and on which event of subfrm2 can i write the code???

At the moment i'm trying to refresh subfrm2 (by using code in subfrm1) and I have placed my code on the On Load event of subfrm2. I thought this way the form will reload and the On Loand event will pick up the new value for boolean XXX and set the label to visible! Thats the idea anyway... here is the code i have in subfrm1:

XXX = True

Forms![frmMain].subfrm2.Form.Refresh

subfrm1.Visible = False

subfrm2.Visible = True

I'm not sure if refreshing the subform will result in On Load event to be executed! And i'm not even sure that the code for refreshing subfrm2 is correct. Can any1 help me with this?

I have attached the actual database on my previous post sent today, if you prefer to look at the whole thing and get a feel of the problem!

View 1 Replies View Related

Label Visible Iif Other Field Value=

Feb 15, 2008

Hi.
I am trying to get a text label to only be visible if the values of 2 other form objects are of a specific value.

This is what I've been trying to do after VAT is changed:

=IIf([Forms]![Jobs]![JobCategoryList]=2 AND [Forms]![The Sale]![VAT]=0.175, [VATWarning].Visible=-1,[VATWarning].Visible=0)

But, it just isn't working.

If anyone can spot the problem in the mess of code I'd appreciate it. Thanks. Martin

View 2 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

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

Forms :: How To Make Combo Box Visible When Click On Label

Sep 28, 2014

i have a label and a combobox (the combobox is invisibile). in a form.

how do i make the combobox visibile when i click on the label?

View 2 Replies View Related

Reports :: Text Label Conditionally Visible On Report?

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

Reports :: How To Make Label Visible Depending On Text Box Value

Jul 27, 2014

I have a report that displays on a continuous style report. What courses the employee have been on and when they expire

right I have field call expirydate and another call dayover showing the number of days till that course has expired also I have made a label called Expired1

now what I'm trying to do.....

if the expirydate has passed I want the expired1 label to be visible and dayover field to become invisible

I have tried

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Expirydate < Date Then
Me.expired1.Visible = True
Me.DaysOver.Visible = False
End If
If Me.Expirydate > Date Then
Me.expired1.Value = False
Me.DaysOver.Value = True
End If

I have also tried the code on current event on the report

now my problem if one of the course has expired it will show the label called Expired1 but on all the records but I only want it to display on the record that has expired and leave the daysover text box visible if course has not expired

View 7 Replies View Related

Modules & VBA :: How To Make Label Visible On A Report If A Textbox Is Empty

May 10, 2014

I'm working on a report. I have a text box that contains directory path for a picture which is showed in a image box on my report which works great. I have now created a label called "nopiclb" that has "no Pic "entered in it but I want to set the label to not visible if path1 has a file path in it but visible if path1 is empty

I put the code below in onformat event in the detail section, but is not working

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.path1) = True Or Me.path1 = "" Then
Me.Nopiclb.Visible = True
Else
Me.Nopiclb.Visible = False
End If
End Sub

View 3 Replies View Related

Modules & VBA :: Unable To Make A Label Visible On A Form During Print

May 9, 2014

I am trying to make a label visible on a form during print if a field has "like a string". We use a form so that it prints 3 forms to one page (They are tags for units for repair). I can get the label to be visible in the form view but when I print, the label is visible on every record where it is only visible on the current record in form view. My goal is to have the label only show on those records where the condition is met.

Here is my code that works in form view only: (It is to designate easier a warranty tag from a new repair tag)

Code:
If Me.Problem_Description Like "Warr*" Then
Me.lbl_w.Visible = True
Else
Me.lbl_w.Visible = False
End If

I have attached an image of a tag sheet Tag_Sheet_W.jpg. As you can see if I got my desired result only the first tag would have a W.

View 1 Replies View Related

Visible And Null

Mar 30, 2006

Simple but confusing.

I have a form with several controls. NAME, DOB and AGE.

NAME and DOB have a source to a table while AGE is unbound.

I would like a code that when opening the form, will show the age only if the DOB contains data.

Basically something like this:

If IsNull (Me!DOB) Then
Me.AGE = Null

Else

If Not Is Null (Me!DOB) Then
Me!Age.forecolor = VBWhite 'this hides the data)

End If
End If

Any help what I am doing wrong?

Thanks.

View 1 Replies View Related

Onformat For Report Make Visible Is Not Null

Aug 13, 2005

I want my fields on the report to show up if there is data to show and to disappear if no data is avaliable. Also, will the fields format together or will they still stay apart? I need them closer together for the report.

Here we go.

In the report are months 1, 2 and 3 as well as the label box for each. I need the label box and the data(text box) to disappear when the data box is null. This is where I had started:

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)

If Not IsNull(Me.Ctl1_Month) Then Me.Ctl1_Month.Visible = True
Else
Me.Ctl1_Month.Visible = False
End If


End Sub

But when I try and run the report I get this error:
Can't Execute Code in Design Mode.

Can someone help as to what I have done wrong or where I should place this type of format?

Many thanks.

View 8 Replies View Related

Hide Report Label When Text Box Is Null / Blank

Oct 29, 2013

I am attempting to use VBA code to make the label in my report hidden if the text box is blank. I am very new to coding, and am not sure how I would express this in code. I have been looking at a few examples of how to get this done, but it doesn't seem to work. Where to insert the code. Attached is the image of the properties for my label and text box that I want hidden if text field is blank. I al just lost trying to figure this out.

View 7 Replies View Related

Reports :: Null Date Field - Make Entire Entry Not Visible On Report

Dec 16, 2013

I am building a report that has a header with several details followed by a detail section.

What I need to do is make the entire entry not visible on the report if one of the dates is null.

So it looks like this

last first title id memb # date a date b
1. smith , john fng 8521 2356224
5/12/2012 6/20/2013
10/2/2013 (is null)

2. neckbone, jim dude 2548 85858412
6/20/2013 5/5/2014
8/5/2013 2/31/2013

On the report i want the 1st entry (smith john) not to be visible due to the null (B) Date.... but i want it to be visible once the date is entered...

View 2 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

Make Field On Subform Not Visible

Mar 17, 2005

I have a form with a subform. I would like to make a field on the subform not visible if a field on the primary field is null. Can anyone help? Thanks.

View 1 Replies View Related

ARGH !! Need Help On Visible/Invisible Subform

May 11, 2006

I am trying to make a subform appear when a particular entry is selected from a list box. I did a test... no problem. In my real database... well, you know. Here's my code:

----

On my main form property:

Private Sub Form_Open(Cancel As Integer)

DoCmd.Maximize
DoCmd.GoToRecord , , acNewRec

If Me![ProjectSubType] = "Commercial Chest" Then
Me![CommercialChestsSubForm].Visible = True
Else
Me![CommercialChestsSubForm].Visible = False
End If

End Sub

----
On my list box property:

Private Sub ProjectSubType_AfterUpdate()

If Me![ProjectSubType] = "Commercial Chest" Then
Me![CommercialChestsSubForm].Visible = True
Else
Me![CommercialChestsSubForm].Visible = False
End If

End Sub

----


Any help is GREATLY APPRECIATED.

Tom

View 2 Replies View Related

Modules & VBA :: How To Check If A Subform Is Visible

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

Macro For Visible Field In Subform

Sep 10, 2012

I have created a form with a subform.

When opening the main form I would like to create a macro that is able to set the property visible/not visible for a certain field if a certain condition on another field is satisfied. I Have Office 2010 and with the macro editor I'm not able to make it work. Need writing the text as in the macro editor?

Here below the example:

Main form name: FORM_1
Subform name: SUBFORM_2
Subform field: FIELD_ABC
Subform field: FIELD_123
Subform field: FIELD_CHECK

Opening the form FORM_1, the macro must show the field FIELD_ABC and hide the field FIELD_123 only if FIELD_CHECK is equal to "TEXT OK" ...and the macro must hide the field FIELD_ABC and show the field FIELD_123 only if the field FIELD_CHECK is equal to "TEXT WRONG".

I would like to use the same macro on a report.

View 7 Replies View Related

Label Name Referring To Subform

Jul 3, 2006

Just a quick question, I can't seem to get this right (as usual :confused: )

I have a form and I want the label in the header to display the text from a field in a related subform. I have tried the following syntax to no avail:
=[Forms]![sfrmCompanyName]![LastName]

Any suggestions

Thanks in advance

Nicolas

View 2 Replies View Related

Forms :: Subform Visible / Invisible Based On Control

Jun 18, 2015

I need to have a subform that shows up smack dab in the middle of my main screen when visible - which is what I want - but only based on a specific value of a control on the main form. Specifically, if a control's value is "See Spreadsheet", I want the subform visible front and center as it contains the link to the server location for that specific record. If the control's value is not "See Spreadsheet", I want the form to be invisible.

My code:

If Me.BudgetsFacultyAccountNumber = "SEE SPREADSHEET" Then
Me.frmMsgBoxUpdateSpreadsheet.Form.Visible = True
Me.BudgetsFacultyServerLocation.Visible = True
Else:
Me.frmMsgBoxUpdateSpreadsheet.Form.Visible = False
Me.BudgetsFacultyServerLocation.Visible = False
End If

The red lines result in an MS VBA error: "Compile error: Method or data member not found."

I've tried referencing that subform a hundred different ways, but I can't get it to work.

View 5 Replies View Related

Modules & VBA :: Using Form Combo Box To Control Subform Button Visible Or Not?

Nov 24, 2013

How to use the combo box from the form to control subform button or textbox visible or not?

View 5 Replies View Related

Forms :: If No Records In A Subform Display A Label?

Feb 27, 2014

I have a form with 3 subforms on it based on individual queries.

If there is no data to display the subforms are blank.

I want to display a Label on the subform saying that there is no data to display?

View 6 Replies View Related

Reports :: Image Visible On Sub-report When Choose Received Payment In Subform

Mar 4, 2014

I have a database that I use for keeping track of clients and printing invoices using a form/sub-form and report/sub-report. I want an image to be visible on my sub-report when I choose Received Payment in my sub-form. Right now I have my image set to visible = no.

View 14 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







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