text box if statement does not work when displayed in main form

I have a subform (fExtraHrsDetails)with the below code.
If the field (Stage) is "Active" the text box (ProjIDCL) is displayed
else
the text box(ProjID) is displayed

Private Sub Form_Current()
If Me.Stage = "Active" Then
ProjIDCL.Visible = True
ProjID.Visible = False
Else
ProjIDCL.Visible = False
ProjID.Visible = True
End If
End Sub

This works great in the subform, however, when I display the main form, the 
sub form does not display the correct text box.

What am I doing wrong?
Why does it work in the subform  and when I display the main form is is not 
working???
-- 
deb
0
Utf
12/5/2007 7:07:00 PM
access 16762 articles. 3 followers. Follow

1 Replies
1037 Views

Similar Articles

[PageSpeed] 25


I figured it out.  Thank you
-- 
deb


"deb" wrote:

> 
> I have a subform (fExtraHrsDetails)with the below code.
> If the field (Stage) is "Active" the text box (ProjIDCL) is displayed
> else
> the text box(ProjID) is displayed
> 
> Private Sub Form_Current()
> If Me.Stage = "Active" Then
> ProjIDCL.Visible = True
> ProjID.Visible = False
> Else
> ProjIDCL.Visible = False
> ProjID.Visible = True
> End If
> End Sub
> 
> This works great in the subform, however, when I display the main form, the 
> sub form does not display the correct text box.
> 
> What am I doing wrong?
> Why does it work in the subform  and when I display the main form is is not 
> working???
> -- 
> deb
0
Utf
12/5/2007 7:19:01 PM
Reply:

Similar Artilces:

How do I delete a text box from an Excel spreadsheet?
Rightclick on it and select cut If the textbox is from the control toolbox toolbar, you may have to click on the designmode icon first. Uncle Binky wrote: -- Dave Peterson ...

Changing text size
Hi, We enter all our customers in our database in all caps (text) for the names, and addresses. But when you put in the zip code and the database auto finds the town and state it is put in upper, and lower case. Is there a way to change this default to all caps for the auto fill. I am experienced in editing xml. files ( just a note) Any help would be appreciated.....Dennis No, there's no way to change that in the front end, that's something that is happening at display time and is meant to make the data more readable. You could enter a suggestion on Customer Sou...

Changing the Tooltip text in an SDI Toolbar
I've been trying to find a way to change the tootip info for a toolbar. Currently, I've tried getting the toolbar CToolBarCtrl and CToolTipCtrl objects but haven't been able to figure out what to do with them. Any help would be appreciated. Thanks, Ken If you are talking about tooltip info of a particular button on a toolbar, change it in resource editor by double clicking on the button and changing the text that appears at the bottom of the dialog. Text that appears before \n is tootip. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Ken Slight" <kslight@char...

Some good work
Hi Everybody I just able to create lookup field. And with this I can enble to show the lookup field of the same entity in the same form. So I think I got a way to get around the one-to-one and many-to-many relationship. Is not it good? Anyone need any help, let me know. Thanks and Regards -- Jaber ...

importing multiple text files???
Hi, I am experiencing a big problem. As a part of my analysis for PhD I have to analyze more then 1000 files. The data that I have is in text files. To be more precise, I have 5 different data sets, from different meteo centres, each centre has a data set of 365 files for each day during the year. The format of text files is something as following: Camborne Met. Office WINDS rev 4.1 50.20 -5.30 88 02 01 01 00 00 23 0 29 3 35 07:09 (3.0) 07:09 (3.0) 06:08 (3.0) 284 284 65 65 400 400 23 23 12.5 12.5 1 1500 1500 35 35 400 400 43 90.0 43 74.5 313 74.5 HT SPD DIR Radials... 0.101 9.8 113 0.0...

Button/Macro Not Working, Help!
I have a macro that pulls up Report Manager and prints out pre-define views. The macro works fine only after I use Report Manager the firs time. If I exit my workbook and Excel, then return to it, th button/macro does not function. Nothing happens until I manully us Report Manager again. Is there a bug with this or am I missin something -- Message posted from http://www.ExcelForum.com Post your code. Gord Dibben Excel MVP On Thu, 20 May 2004 08:38:55 -0500, baston <<baston.16k4at@excelforum-nospam.com>> wrote: >I have a macro that pulls up Report Manager and prints out pre...

Failure to Display anything but Methods in Microsoft.CRM.Proxy.dll
I'm using both VS.NET and VS.NET 2003 to attempt to run the "Find all the Incidents for an Account or Contact" code on MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crmsdk/htm /findallofthecasesassociatedwithanaccountorcontact.asp). I've added the reference to Microsoft.CRM.Proxy.dll and also have attempted to use the Microsoft.CRM.ComProxy.dll when the first failed. I am unable to compile as the C# compiler states that both ".Credentials" and ".Url" are not valid properties of the Microsoft.CRM.Proxy.BizUser class. I used the o...

Create form similar to MS Access 2000 Help
Is it possible to create a form that works similar to the Help - Index form in Access 2000? My StreetTable consists of the following fields: Street_ID(autonumber), StreetName(text), Directions(memo). I want to be able to type the beginning letters of the street and the List of StreetNames continually reduces until I see the street I need in the StreetNames window. I would then click on that street and the Directions would appear in the third window panel. Since I'm dealing with approx. 5000 streets, scrolling really isn't an option that I want to consider. I found that a combo ...

Rule not working
Background: I have a user with two email addresses. His primary address is "joe@domain.com" and he has a second address called "info@domain.com". We are running SBS2003 with Exchange and the user is using Office 11. Goal: He wants all mail that is sent to the info@domain.com address to be forwarded to another user in the same domain. Problem: Sounds easy enough, right? When the Exchange server receives a piece of mail to info@domain.com, it renames the recipient to joe@domain.com thus causing our rule not run. Obviously we can't forward all mail to the o...

Change opening postion /Form
From my Main Form I have a control that open a smaller form overtop of main Form, It always opens in the middle of my Main Form, can I reposition it to open higher on my Main Form, Thanks for any Help.....Bob On Mon, 6 Aug 2007 11:13:29 +1200, Bob V wrote: > From my Main Form I have a control that open a smaller form overtop of main > Form, It always opens in the middle of my Main Form, can I reposition it to > open higher on my Main Form, > Thanks for any Help.....Bob Look up the MoveSize method in VBA help. DoCmd.MoveSize 2 *1440, 3 * 1440 will position a form 2 inch...

How can I Enable a Check Box based on another fields value?
Hi There, I have a form with a disabled check box. I need to enable it when a certain value ("approved") is selected from a combo box. When I am in Form Design View and I have the Check Box selected the Conditional Formatting menu item on the Format menu is greyed out. I am using Access 2003. Can you tell me what I need to do to make this work? Many thanks, David As you've discovered, Conditional Formatting isn't availabe to checkboxes. Try this: Private Sub Form_Current() If Me.YourComboBox = "Approved" Then YourCheckBox.Enabled = True Else YourChe...

Newbie: can't get a calculated value on the form?
I have a table with numbers and a form that shows the numbers. I have a query that takes one of the numbers and mulitplies it. I put a text box on the form from the query result field, but I get a "#Name" error instead of the result. When I run the query, I get the correct result. Help, please? Ed "Ed from AZ" <prof_ofwhat@yahoo.com> wrote in message news:d1e7d27c-11d9-4696-8d19-4c5fdd9dbb89@d70g2000hsb.googlegroups.com... >I have a table with numbers and a form that shows the numbers. I have > a query that takes one of the numbers and mulitplies it. I p...

Email to Quote not working...
Here are the steps we have taken to make email - to - queue work, yet is has not: 1) created a new user in AD which will be the public email for our users, namely: AALSupport@CRM.local 2) Ensured an email box was created for this new acct. 3) Created a 3rd Acct which will be the forwarded to acct: CRMMBX@CRM.local 4) Configured properties to include the mailbox rights for SELF were a) Read b) Full Mailbox Access c) Associated Ext. Acct. 5) Added the two new users to the CRM. 6) Ran the Rule Deployment Wizard and typed in "CRMMBX@CRM.local" in the box. ...

AutomaticScale doesn't work properly
Hi all a question a fellow employee has asked me earlyer: I have two identic formatted tables, with each 2 columns 1. Column contains each Month of the last 3 years 2. Column contains Data, normal numbers without link or whatever first table ranges from 98.8 to 109.3 second table from 100 to 136 Now i'm going to do two chart from those two tables: first table changes into a chart where the minimum is automatically set to 92, second table however has a minimum of 0!?? even when i change some of the numbers it stays like that! What points does excel take into consideration for calculating ...

Updateing data when closing forms
I am using MS Access 2000 I have a table that has several required fields. I developed a form to add records to the table. In addition to the table fields, the form has a form-close button constructed with the button wizard. When I enter a record that does not have the required information and close the form with the “Close Window” (X) button on the tool bar, the appropriate error message appears telling me that there is missing data. (Just what I want) When I use the close button on the form, the form closes with no message and without adding the record. How do I give the button on the f...

Multiple IF statement not working
I have numbers in cells b2, d2,e2, and f2. I am trying to write statment that will increment number in cell b2 by one for each cell (d2, e2, f2) that is greater than or equal to one. The following formula will not work if more than one cell (d2, e2, f2) has a zero in it: =IF(AND(D2>=1,E2>=1,F2>=1),B2+3,IF(OR(D2=0,E2=0,F2=0),B2+2,IF(AND (D2=0,E2=0),B2+1,IF(AND(D2=0,F2=0),B2+1,IF(AND(E2=0,F2=0),B2+1,))))) Does anyone know why? Try this =B2+COUNTIF(D2:F2,">=1") -- Wag more, bark less "Anthony" wrote: > I have numbers in cells b2, d...

My input form isn't empty?
I have a form with two subforms. All three forms have the Data Entry property set to Yes. The main form only has one control called txtmonth and the two subforms are linked to the main form on this control. However when I input a value to the control on the main form the subforms are populated with data from their related tables. Why aren't my subforms empty for me to add new data? Tony -- Why don't my grey cells communicate with each as fast as they used to? I hate getting old! Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-for...

POP3 and SSL not working 8(
Hi My pop3 ssl connection to exchange 5.5 mailboxes isnt working. The exchange server is NT4. I created an OpenSSL certificate and followed the MS guide to installing SSL certificates: http://support.microsoft.com/default.aspx?scid=kb;EN-US;175439 In Exchange administrator the pop3 protocoal is enabled for the site and the server, with 'Basic (Clear Text) using SSL' and 'Windows NT Challenge/Repsonse using SSL' ticked. The IIS key manager shows a key under POP3, the properties of this key shows it is not out of date, and is 'complete and usable' Do I have to do an...

VBA code to hide all the tables on form open
I don't want people to use a blank mdb to import my tables. I manually hide them all. However, after running the macro to delete all records and import from .txt, the table become unhide. I do the importation on daily basis. I posted to macro newsgroup and asked way to hide table after importation action macro but got no answer. Maybe it cannot be done in macro? If so, I need VBA code to hide all the tables on form open. Thanks. Hiding your tables won't prevent people from being able to import them into a blank mdb. All they have to do is ensure that they've set the datab...

Scheduled Active Directory Synchronization doesn't work
We have some troubles with scheduled AD synchronization with MOPS 2007. This error was appeared without visible reason. We have the following error in Application log: Event Type: Error Event Source: Office SharePoint Server Event Category: Project Server Active Directory Synchronization Event ID: 7715 Date: 22.01.2010 Time: 7:15:01 User: N/A Computer: SHHARA Description: Standard Information: PSI Entry Point: Project User: DOMAIN\runsql1service Correlation Id: d5ddd59b-b0d7-40a5-bb1c-7839c26608ea PWA Site URL: https://sh1.xxx.com/PWA SSP Name: SharedServices1 PSError...

Combo box choice outcome
I have a combo box with the following choices: Checks_Walkthrough Checks_Monitor Research_Case Inventory_Maint Task_Cable Task_Misc New Issue What I want is if anything BUT "New issue" is selected, two fields in the same form as the combo box are populated by other data in the table the above list is pulled from. I can get this to happen by itself. Me.Text27.Value = Me.imac.Column(2) Me.model.Value = Me.imac.Column(3) If "New Issue" is selected, I want another form 'New_case' to open and enter the required data there. I can get this to work alone ...

Passing Values from One Form to Another Including a Combo Box
Hi, hope someone can help with passing two values from one form to another by way of a command button. I have spent a week on various code taken from this site, but still no luck. Please ... someone help!! The form I am passing values from is called PATIENT HISTORY-Form. On this form, I need to pass a date from a field called DateSFESigned and I also need to pass information collected from a Combo box, Combo91. The command button is called Command119. The form that the values are being passed to is called Personal Habits- Form. Thank you in advance for any help on this matter. Maurita ...

Pictures/Graphics won't display on website
Help, I'm new at this and have problem getting my website that I created in Publisher posted to web. The site will appear when I copy the index.htm file using my ISP file manager but not sure where the index_file folder and related graphics/pics need to be copied to. I tried creating a folder for index_file and copied all the files there that appear on my c drive when I published to the web. But all that displays are the alternate text for each pic/graphic. Any suggestions? A small child turns to Ed, and exclaims: "Look! Look! A post from anonymous@discussions.microsoft...

Importing to a contact subfolder with that has a custom form
I am using a custom form for a subfolder under contacts. When I use the import wizard to import a comma deliniated DOS file the resulting records are in the default contact form rather than the custom form. When I manually add a contact it correctly chooses the custom form. Any help will be welcomed! You can re-apply the form to the items that don't have it - methods depend on your version of Outlook. Bob White wrote: > I am using a custom form for a subfolder under contacts. > When I use the import wizard to import a comma deliniated > DOS file the resulting records are i...

45 Degree Angled Text & Fill Option
I have Excel 2003 (11.6355.6360) running on XP and I'm wondering if this is a bug or not. If you have text in the first Row and you set it to 45 degrees angled, if you try and fill different cells with different fill colors, sometimes the box will fill angled, othertimes straight up and down. As a simple test, try creating a blank worksheet and make the first 3 columns 35 each in width and 100 in height. The type some text in each of the cells - not too much. Now select all 3 cells and format their alignment to 45 degrees. Now pick each one of the cells and fill each with a different ...