Conditional Visibility - Based On Subforms

Feb 28, 2014

I have a main form with several subforms within it. These subforms are navigation tabs. In the footer of the main form I have a textbox that I want to hide unless the 2nd tab is selected.

Details:

3 Tabs, 1 subnavigation subform, 3 tab indexes(0,1,2)
tab index 1 the textbox on the main form(parent) should be visible. tab index 0 and 2 the textbox should be hidden.

I was thinking I could do something like when tab index 1 is onFocus then textbox = visible and vice versa on the other tab indexes?

View Replies


ADVERTISEMENT

Reports :: Conditional Object Visibility?

Jun 5, 2013

I have a table w/field: Number {1,2,3,4,5,6,7,8,9,10} I have a report based on the table containing:

1 field: Number, box A and box B.

I would like for the report to show Box B if Number > 5, else show Box A.

View 4 Replies View Related

Forms :: Subform Visibility Based On Text Box Value

Jan 2, 2015

I am trying to get a subform to be hidden when the value of a textbox (txtAllocationID) is empty but when a ID number appears I would like it to become visible again.This is what I have tried so far but doesn't seem to work:

Code:
Private Sub txtAllocationID_AfterUpdate()
If Me.txtAllocationID.Value >= 0 Then
Me.frmStockAllocated.Visible = True
Else
Me.frmStockAllocated.Visible = False
End If

End Sub

My allocation ID is a primary key so all auto number generated and only an integer.

Scenario: When I enter a stock ID of 121 and search I want the subform to remain hidden as there is no Allocation ID related to that Stock ID (see attachment tblAllocated). If I was to enter a stock ID of 122 I want the subform to become visible as the stock ID has a relation with the Allocation ID 6 and therefore the textbox txtAllocation ID would display '6' in it.

View 2 Replies View Related

Reports :: Visibility Based On Whether Table Field Is Empty

Jul 11, 2013

I'm having trouble with syntax for using VBA on a report in Access 2007. I need to some hide 3 text boxes if one of my fields is empty in a table. The table name is: 'ALM-RESP' with rows grouped by: 'TAG NAME' and the field I'm checking is: 'Rev 002 Author'. I've tried having a rectangle to cover it up but I'm having trouble using the IsNull command and setting the visibility of the rectangle. Here's my code:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull([ALRM-RESP]![TAG NAME]![Rev 002 Author].Value) Then REV2BOX.Visible = False
End Sub

Basically I'm having trouble checking if the field is empty and then setting the visibility.

View 1 Replies View Related

Set Field Visibility Based On Second Field Value

Mar 23, 2005

This should be fairly easy - I'm probably thinking too hard today.

I want to display a Quantity text control (and the related label in the form header) when the Serial control = "Bulk" OR when the checkbox chkBulk = -1 (checked). I don't need to do both, just one of the above, as I still haven't decided the easiest way to approach this problem.

I need some way to check the value of the checkbox or Serial control in the AfterUpdate event, and set the visibility of the Quantity control to true/visible. It is currently set to not visible. I have experimented a bit with the iif in VB, but my VB skills are rather nonexistent - i can read and comprehend code, but I can't yet write it on my own.

This seems like a relatively easy one or two line procedure. Can anyone offer some advice or point me in the right direction?

Slaughter
slaughter at missouri dot edu

View 2 Replies View Related

General :: How To Return A Value Based On Another With Subforms

Mar 14, 2015

I have a form with a field within it called ID number, another table contains the ID number with a person's name next to it. I was wondering how I can make it so that in the form, when the ID number is entered, the name of the person also shows next to it and does so automatically for each different record. I am pretty sure that a subform is needed however it doesn't seem to work for me so I must be doing it wrong. How would I do this?

View 1 Replies View Related

Conditional Formatting Based On DCount

Apr 11, 2006

Hi all.

I've been struggling to find a solution for this. Never previously used conditional formatting I could use some help.

I have a sub form consisting of continuous forms...

Based on whether or not the below DCount indicates 1 or 0 I want to change the BackColor of a Textbox.

DCount("fID", "tblRegister", "fID = " & Me.fID.Value & " AND samtyckeBarn = TRUE AND samtyckeBarnVuxen = TRUE"))

Where/how do I implement this?
I do not yet fully understand the FormatConditions collection of the textbox but I guess that's where to work.

View 2 Replies View Related

Conditional Format Based On 2 Fields

Jan 24, 2008

Hello All,

I have searched the forum but I don't quite get what I am looking for.
I have a subform that has these 2 fields:
- Status
- LastFollowup

What I want is if the Status shows "Pending" and the date entered on the LastFollowup is more than 7 days. Then it should turn Yellow.

I tried this code in the expression box but it doesn't seem to work

[Status]="Pending" and [LastFollowup]>7


Could anyone please assist? I know this is simple but it's not working for me.

Thank you

View 6 Replies View Related

Conditional Formatting Based On Another Field

Mar 28, 2006

Is there a way to apply conditional formatting on a field based on the contents of another field?

For example, lets say I have the following fields

START_DATE
APPROVED_DATE
CAT#
DAYS_OPEN

The DAYS_OPEN field is automatically calculated in the query and is not a stored date.

My criteria is that if CAT# is 3, my days open should not exceed 30 but if my CAT# is 1 or 2, my days open should not exceed 60. I want to apply conditional formatting so that it turns yellow at approximately 80% of the date limit and red at approximately 90% of the date limit, otherwise the conditional formatting is green.

I know how to do conditional formatting, but no sure if it can be modified based on the content of another field.

Thanks for any suggestions.

Jim

View 4 Replies View Related

Switching Subforms Based On A Record Selection

Jan 18, 2006

Right slightly complicated (in my eyes) and I have not found anything in previous threads to help but here goes:

I have a main form (FRM_SUMMARYREVIEW) that has an unbound subform field on it (subfrmmaster).

When FRM_SUMMARYREVIEW is first opened subfrmmaster has its sourceobject set to a form called FRM_OPENSUMMARY.

This subform lists all my open escalations, in a continuous forms format and has a field in it called "escalationid" and when I click this field "subfrmmaster" changes it's sourceobject to another form called FRM_MAINDATA and should display the data relevant to the escalationid I have just selected.

In the past I used to click on "escalationid" and it opened up FRM_MAINDATA as a new form, using the following code:

Dim Searchstr2 As String
Searchstr2 = "[Escalation ID] = " & Forms![FRM_SUMMARYREVIEW]![FRM_OPENSUMMARY].Form![escalationid]
DoCmd.OpenForm "FRM_MAINDATA", acNormal
Forms!FRM_MAINDATA.Filter = Searchstr2
Forms!FRM_MAINDATA.FilterOn = True

However how can I get the subfrmmaster sourceobject to change and display the relevant escalation detail ?

My other option is to have two subforms on the main form, one with "FRM_OPENSUMMARY" the other with "FRM_MAINDATA", as "FRM_OPENSUMMARY" has a list of escalations displayed, in a continuous forms format could I set it so as I arrow down the list, the data in FRM_MAINDATA displays the highlighted escalation in "FRM_OPENSUMMARY".

I hope this makes sense

MattP

View 5 Replies View Related

Forms :: Moving Subforms Based On Input

Jul 9, 2013

I'm creating a database for work, and one of my forms currently has 8 subforms on it. For each individual account there can be one, none, or many of any combination of these subforms that will have information on them. I need the form to be able to show all of them, as someone else will be inputting all the information when the database is complete, but to make it easier I have set it up with checkboxes so that when a checkbox is checked, a subform shows, if not checked it doesn't show. I have very limited skills with VBA, so that in itself was an accomplishment for me.

My questions is: is there anyway in access to do it so that if a subform doesn't show, all the ones beneath it that do show will get bumped up so that it is easier to read/input data?

I have attached my DB and the appropriate form is "ICinfoT."

View 2 Replies View Related

Conditional Visability Based On Combo Box Selection

Dec 22, 2006

I'm not new to object oriented programming but I am new to Access. I have found some questions similar to mine in search but I need more explanation if someone wouldn't mind.

In my form, I have a combo box that looks up 3 values from another table. Among other controls, I have a few text boxes that I only want visible if 1 of the 3 possible combo box options are selected.

I understand that the code for this should probably be placed in the "events" of the of the combo box...which one? I understand the logic but what would the code look like? Do I use the expression builder?

Thanks for any help on this.

View 1 Replies View Related

Conditional Format Based On Previous And Current Record

Feb 4, 2005

I'm having trouble with a tricky conditional format in a continuous subform.

The criteria is based on field [GroupNo] when it changes (increases) which are always listed in numerical order.

Basically all I want to is for the text box colour to alterante (eg blue & yellow)when GroupNo changes value

So it would look something like this....

Group NoID (highlight colour)

1 (yellow)
1 (yellow)
1 (yellow)
2 (blue)
2 (blue)
2 (blue)
3 (yellow)
3 (yellow)
etc etc

btw, although values will always be in order they may not all be output, so it's not just case of odd, even, odd, even (that would be too easy!)

I can retrieve the Previous Record's GroupNo value (via a function) in another text box and compare current GroupNoID with this in the Format Expressions and manage to change the colour, but it won't sustain this new colour for the subsequent same GroupNos, obviously as the values have changed.

So how can I....

Change the colour when the value changes.
Keep this new colour until it the value changes (increases) again.

Many Thanks

View 14 Replies View Related

Conditional Formatting - Form Based On Text Box Entry

Mar 24, 2006

Hello,
Could some kind person out there help me out please?
I have been 'dabbling in' the area of conditional formatting, particularly in the area of changing the colour of my active form based on the result of what’s output on a text box. I have had some success in this area but where I am getting confused is getting the colour of my form to change on the basis of what is entered into a text box control that does not match exactly. My forms background changes to the required colour when its value is ‘set exactly’ but what I am trying to achieve is to change it according to the first letter of entry regardless of what follows? It always starts with a letter, either a ‘D’ or ‘V’ to indicate whether its ‘Vital’ or ‘Desirable’ and is subsequently followed by no more than 6 numbers and finally a letter. Basically I need my form to change colour based on the whether it is either a ‘V’ or a ‘D’ irrespective of what follows???

What I have been using so far is:

Private Sub Model_Number_AfterUpdate()
If Me.Part_Number = "V111145K" Then
Me.Section(acDetail).BackColor = 12632256 'Light Red
Else
Me.Section(acDetail).BackColor = 8421631 'Blah Gray
End If
End Sub


Private Sub Form_Current()
If Me.Part_Number = "V111145K" Then
Me.Section(acDetail).BackColor = 12632256 'Light Red
Else
Me.Section(acDetail).BackColor = 8421631 'Blah Gray
End If
End Sub

Can anyone help me out of a ' sticky situation'..

Ta Very much

Carol

View 3 Replies View Related

Conditional Format Form Based On Text In Txtfield

Sep 14, 2006

Hi All,

I'd lile to show/hide selected subforms based on the the text in a txtfield.
The text in the selection field (txtSelect) I'd like to use for that may be either one of the following:

book-01, book-02, book-03 etc OR,
folder-01, folder-02, folder-03 etc OR,
record-01, record-02 record-03 etc. OR
it can be just a 4 digit number.

If the txtSelect contains "book" I'd like the subfrmBookdetails to be visible.
If the txtSelect contains "folder" obviously the subfrmFolderdetails etc.

What I'm struggling with is the If-Then statement for selecting the partial text in txtselect.

I've tried things like this:
On current
me.txtSelect.setfocus
if me.txtSelect.text="book*" then
me.subfrmBookdetails.visible=true etc etc.

No joy.

I know how to get this to work in a query with a like-statement but I have not been able to find anything on this in relation to conditional formatting of a form. Any one and good ideas?

Thanks,
Walter

View 2 Replies View Related

Forms :: Conditional Formatting Based On Value In Targets Table

Oct 15, 2014

I have a form which basically has - employee, work done, hours and a calculated field (w/hour) of work done/hours

I can manually set the conditional formatting however as time changes targets will go up and it would be easier to update the targets in another 'admin form' (i can manage that part)

Its just referencing the other table to say the likes of :

if work per hour is greater than tbltargets.convtargetmid then vborange, if work per hour is greater than tbltargets.convtargethigh then vbgreen else vbred.

View 3 Replies View Related

Forms :: Conditional Formatting Based Upon Presence Of A Record

Mar 13, 2014

I have a subform (called NAMES) on a main form (called MAIN) that lists names. Elsewhere on MAIN, I have a second subform (called ASSIGNED) that lists people that have been assigned.

When I double click a name on NAMES, it automatically adds them to the ASSIGNED list (who's record source is a table). What I want the NAMES form to do is conditionally format the NAMES form so that the record that's been added turns green. That way I can see who I've added and who I haven't yet added. Once I've added them all, the NAMES form is a simple list of all-green names. If there's a black name in the list, it's because I haven't yet added them to ASSIGNED.

I've tried a DLookup function, and I've tried a Value= conditional formatting rule, and neither one are working... I already got the 'double click to add' thing working, now I just need the name to turn green when I've added them.

View 11 Replies View Related

Reports :: Conditional Formatting Based On Two Fields - Highlight In Red?

Feb 17, 2015

So i have two fields I need to tie together for conditional formatting

If the "status" field says "RETURN" and its over "30" days then I need to highlight it RED

If the "status" field says "AVAILABLE" and its over "90" days then I need to highlight it RED

Is this possible?

View 5 Replies View Related

Modules & VBA :: Display / Hide Subforms Based On Yes / No Field In The Form

Oct 4, 2013

I have created a form with 3 subforms on. i was just wondering is it possible to display/ hide these subforms based on a Yes/No field in the form. as the subforms would only be valid if the field is ticked as yes.

View 14 Replies View Related

Modules & VBA :: Conditional Reporting Based On Value Of A Field In Selected Record

Mar 27, 2014

I have the following code that I need to modify:

Code:

Private Sub ChargeReport_Click()
On Error GoTo Err_ChargeReport_Click
Dim stDocName As String
stDocName = "Charges_Report"
DoCmd.SendObject acReport, stDocName, acFormatPDF, , , , "Charge Sheet"

[Code] ....

Currently, this code opens an input box that accepts the ID number for a particular record. Then it attaches a specific report for the selected record to an email. It works fine for this purpose.

I want to modify it so that it attaches one of several different reports depending upon the value of a [Staff_ID] field in the selected record.

I've tried a number of different solutions using an InputBox to get the record ID along with an If/ElseIf/Else construct that evaluates the [Staff_ID] field in order to determine which report to attach to the email, but I cannot find my error.

View 4 Replies View Related

Forms :: Conditional Formatting Text Boxes Based On Yes / No Field

Jan 8, 2015

I am trying to get the text in a couple text boxes to turn green if a certain Yes/No field is left blank.

I know the conditional formatting is working, because condition 1 and 3 are working fine (those expressions are referencing text fields).

I would like to have Condition 2 look at [DM_Approval] from the bound query and if it is unchecked, execute the conditional formatting.

I've tried all kinds of statements, but i'm starting to think that the expressions in the conditional formatting window just won't work when referencing a yes/no field.

Specifically (at the very least) i know i tried [DM_Approval]=False, [DM_Approval]=No, [DM_Approval]=0, and [DM_Approval] is null.

View 3 Replies View Related

Reports :: Conditional Formatting On Multiple Fields Based On Two Criteria

Sep 24, 2014

I have a report which I would like to apply conditional formatting on multiple fields. I would like the conditional formatting to be based on two types of criteria

First criteria would be contracts that start with the year 2014. I used the following expression which worked - InStr(1,[ContractNr],"2014" AND [DirectorInCharge]= "Joseph Steinbok" or "Adam Godson")

To this expression I would also like to highlight fields which contracts start with 2014 AND have a particular Director assigned to it. For this I used the following expression - And [DirectorInCharge]="Name"

On their own, both expressions are working but I want to combine them. How do I do this? I've tried the following - InStr(1,[ContractNr],"2014" AND [DirectorInCharge]= "Name") but then nothing is highlighted. I also tried InStr(1,[ContractNr],"2014") AND [DirectorInCharge]= "Name" - in this instance EVERY record was highlighted.

View 4 Replies View Related

Reports :: Conditional Formatting - Rows To Be Of Specific Color Based On Value In 1 Field

Jul 24, 2014

I have a report that I would like to have the rows be a specific color based on the value in 1 field on the row.

I have attempted to use conditional formatting but it will not work (IE, I can get font color to change, but not field boxes to have color).

The field is labeled [text144] based on the value in the field (1,2, or 3) I would like the field to be a different color.
i.e.
3 = green
2 = yellow
1 = red

View 4 Replies View Related

Forms :: Conditional Formatting Changing Field Color Based On Hours Passed

Jan 7, 2015

I'm having a spot of trouble trying to get conditional formatting to work. I have an overview form which displays current quotes going through the system, the QuoteStartTime field is generated from the Now() command.I Would like if possible to show, 1 hour = Green, 2 hours = Amber and 3+ hours Red.

I've tried variations of
hour([QuoteStart])>1
DateAdd("h",1,[QuoteStartTime])

I've done this before with a date only field before, but working with time is taking too much time.

View 1 Replies View Related

Visibility Of Forms

Jan 11, 2006

Guys

I have a main form that I want users to populate before I reveal a sub-form. I've changed the 'visible' property to 'no' on the subform so it doesn't show by default but can't make it re-appear when I want it to.

I've tried the forms!whereform.visible=true code and it tells me it can't find the form 'whereform'.

Any suggestions?

Cheers

View 4 Replies View Related

Visibility Depending On Query

Jul 11, 2005

Hi!

I'm have a query with some fields but only one record. The values in the record depends on comboboxes in a form.

What the query is doing, is that is calculating percentage. So the problem is if you go from zero to something bigger than zero, then this this gives you an infinite value of percentage. I solved that by if it is a zero, then it's changed to null. Then the percentage will be zero.

What I want, or wonder, is if the value is zero, is it possible to to have a textbox or something "lightened up" in a form? What I mean is that if you do your choices in the comboboxes and this gives you a "bad zero" in the query then a text pops up and tells you that "the values are a little bit wrong" or something like that=)

More "shortly" said, can a texts visibility in a form depend on the value in a query?

Hope you understand what I'm trying to say...

Thanks in advance for any help!

-jake

View 5 Replies View Related







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