locking a text box in a subform

Hi there,

I've got a form that looks like this:

    MAIN FORM
    SUBFORM1
    SUBFORM2
    SUBFORM3

I'm trying to code an event in a listbox in SUBFORM1 that locks a
textbox in SUBFORM2 if the user picks a certain item from the list.
However, I can't seem to get the code right in order to do it.  I
tried this:

If whatever Then
    Forms!subfrm1.subfrm2!Listboxname.Locked = True
End if

However it keeps telling me it can't find subfrm1.

Any ideas?

jjmclell

0
jjmclell
8/22/2007 12:55:00 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
872 Views

Similar Articles

[PageSpeed] 28

On Aug 22, 8:55 am, jjmcl...@lakeheadu.ca wrote:
> Hi there,
>
> I've got a form that looks like this:
>
>     MAIN FORM
>     SUBFORM1
>     SUBFORM2
>     SUBFORM3
>
> I'm trying to code an event in a listbox in SUBFORM1 that locks a
> textbox in SUBFORM2 if the user picks a certain item from the list.
> However, I can't seem to get the code right in order to do it.  I
> tried this:
>
> If whatever Then
>     Forms!subfrm1.subfrm2!Listboxname.Locked = True
> End if
>
> However it keeps telling me it can't find subfrm1.
>
> Any ideas?
>
> jjmclell

Nevermind, I figured it out.

Forms!frmMain!subfrm1.Form!subfrm2.Form!Textbox.Locked = True

0
jjmclell
8/22/2007 1:41:20 PM
Reply:

Similar Artilces:

cmbo box on subform fills fields on form when chkbx is yes
I have a multi-tabbed form that details bid data ranging from pricing to contact info to departmental notes. Page two has a subform listing general contractors to whom we bid. One bid may have 10-15 contractors listed. When a purchase order is issued from one of these contractors I select a checkbox indicating that GC. I would like the opening page on this tabbed form to show the address and contact info for that GC when the checkbox is yes. Is this possible? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200803/1 On Mar 17, 3:04=A0p...

Text Box Linked To Cell
My goal is to have a text box that displays the contents of a particular cell. How do I link the text box to the cell? Thanks, Denise Hi denise, Make a Text Box from the drawing toolbar. Select the box and in the Formula Bar, type = and then select the cell, press enter. ( IE: =$C$5 ) The cell can also be on a different sheet, just do the same. ( IE: =Sheet2!C5 ) Dave denise Wrote: > My goal is to have a text box that displays the contents of a > particular > cell. How do I link the text box to the cell? > > Thanks, > Denise -- Piranha --------------------------...

virus solution for e2k box
All - currently running a Sophos environemnt across our network which includes an smtp gateway but not so long ago we were hit by a virus that Sophos missed - well once they updated the ide it was detected but ironically I distinfected the infected pcs using an online scan (trend from memory) which worked a treat so as a result of this I would now like to run an exchange aware solution which is totally independant from sophos - can I have some recommendations for the e2k box? tia - david I always recommend Trend Micro solutions. They are easy to install - set up - etc. Saludos, Pab...

Modify Exchange undeliverable email text
Is there a way in Exchange 2003 to modify the text of the message that is sent for an undeliverable email address? Thank You Jason Shaw Not natively. James Chong MCSE + Messaging, MCTS msexchangetips.blogspot.com Jasons9745 wrote: > Is there a way in Exchange 2003 to modify the text of the message that > is sent for an undeliverable email address? > Thank You > Jason Shaw Not easily done. Jasons9745 wrote: > Is there a way in Exchange 2003 to modify the text of the message that > is sent for an undeliverable email address? > Thank You > Jason Shaw > > -...

Disappearing Text
Hi. All my new and existing mail in Outlook Express has the subject line and the from populated, but the body of the message won't come up. We get the hourglass and it never goes away. Any ideas? Please email answers to kevinbrand@earthlink.net. Thanks Kevin Hi, Start --> Run --> Regsvr32 inetcomm.dll Hope this helps !!! With Regards, Sudharson.AN "Kevin" <anonymous@discussions.microsoft.com> wrote in message news:1284e01c41826$c0787480$a001280a@phx.gbl... > Hi. All my new and existing mail in Outlook Express has > the subject line and the from populate...

Inserting a string of text in front of existing text in excel
How do I insert a word or words in front of existing text cells on a multiple cell basis ? Hi try something like the following macro (works on your selection): sub foo() dim rng as range dim cell as range dim str_part set rng=selection str_part="precede_" for each cell in rng if cell.value<>"" then cell.value=str_part & cell.value end if next end sub >-----Original Message----- >How do I insert a word or words in front of existing text >cells on a multiple cell basis ? >. > If a formula will do, try something like this (with the existing text...

OWA
OWA text field is always 'grayed out' - on new messages and replies. Small "x" button in upper left of text field seems to have no functionality. Subject field is OK. Bummer - do you have a question? If yes, then try asking it in an Exchange news group as Outlook Web Access is a function of Exchange, not Outlook. Microsoft.public.exchange.admin is a good place to start. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted w...

Problem creating full text index
I seem to be unable to create a full text index of either my public or private store. When I try to creat the index I get the error; The directory name is invalid. Facility: MSSearch.Admin.1 ID no: 8007010b Exchange system Manager This seems to be happening for both the public and private stores. The directory does exist. I have looked over the permissions and tried to compare to known working servers and I haven't moticed any obvious differences. Any ideas? Did you follow this article: http://support.microsoft.com/kb/822932/en-us Nue "Jonathan Huber" <JonathanHu...

Recent update 6/8
I recently updated Windows (6/8) and now one of my user accounts is locked. Running XP. I had to use restore after today's updates -- dlg "CowsyW" wrote: > I recently updated Windows (6/8) and now one of my user accounts is locked. > Running XP. ...

Deleting system locked fields
Does anyone know how I can get rid of the "Is revenue system calculated?" field on the Opportunities form? We always have user-provided values, and therefore have no need for this field, but I can't delete it. Anyone know how I can get around this? You can not delete those fields. But you can change the default value to "user provided". WIth some javascipt you should be able to hide it for the users. HTH, Frederic - Travi@ta www.microsoft-dynamics-crm.eu WiLLerZ schreef: > Does anyone know how I can get rid of the "Is revenue system > calculated?"...

Access 2007 Special Effect Text Box Won't show Sunken with Windows XP
Hi All I am just getting to grips with Access 2007 and one of the quirks I have found is that when I design using Windows in XP Windows-Classic colors and set the text boxes on forms' special effect property to "sunken" They appear as sunken in the correct manner. However, when I change to the Windows XP color scheme the forms text boxes appear flat even though the special effect property has not changed. Any ideas or is it a new quirk we have to live with. I haven't tried it with Vista yet. That should be interesting Thanks Bob I am quite sure this is the same for acce...

Two Outlook 2000 boxes merge to one
Hi: User A: Left the Company Several weeks Ago. User B: Used User "A" email box until she got hired on a Perm basis. Issue: User B now has her own inbox but would like to have all of the 1500 hundred emails and folders in USER "A" in box transferred to her new in box. OBvioulsy she could simply forward these emails to her own box BUT I wanna know if there is another way to get the present info from USEr "A" inbox to transferred USer "B" in box? Can the two in boxes some how merge? Once this "merge" has taken place USER A in box ...

Outlook locks up all the time
This is a shot in the dark. Ever since getting my new Thinkpad with Windows XP, Outlook has never seemed to work properly. I've run diagnostics on my machine and nothing comes up as a problem. I've installed a spyware program because after talking to IBM tech support, they suggested I try that. I also talked to another support tech, who suggested I reinstall Windows completely. I'm not a real technical person. Won't a re-install wipe out my files? Most of the time that I use Outlook for my email, it slows down and eventually locks up. When I restart my computer,...

randomly scatter text
I have pub. 2003, I need to know how to take a phrase and randomly scatter it allover the page, with out placing it manually. I was able to do it on the last version of publisher but I can't seem to find the random button on this one. PLEASE HELP!!! Tabs? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "jenice" <jenice@discussions.microsoft.com> wrote in message news:C2C51271-D425-4E3E-8A71-55365A05D774@microsoft.com... >I have pub. 2003, I need to know how to take a phrase and randomly scatter it > all...

Input text message (dialog box) for data validation
Hello all: This may sound idiotic to some, but I've already been wasting too much time with this option, and am looking for some guru insight. I am trying to input text into the Data Validation Text Box that looks something like this: ------------------------------------------------------------------------------------------------------------------------------------- Q3) Was this a prospective or retrospective analysis or study documenting the effects of XYZ that compared and reported the data in the Marketing Strategy Program? a) Yes b) No c) This appears to be a concise comparison, but ot...

converting from text to numerical number
I have a spread sheet of entire year schedule. The format as following: 1 2 3 .... 31 row 1 row 2 row 3 Jan row 4 row 5 Feb row x Dec I would like to replace column 1 up to Jan to 1. Replace the cell below Jan to Feb to 2. etc. Would anyone help. Thanks in advance. You could select cells A1:A3, type a 1, then press Ctrl+Enter Select A4:A5, type a 2, and press Ctrl+Enter And so on, till all twelve months are done. james wrote: > I have a spread sheet of entire year schedule. The format as following: > > 1 2 3 .... 31 &...

Sorting imported text
I have a spreadsheet into which I've imported a great deal of data in two columns only. I set out rows one, three and five of hundreds of such rows. The cells in column A consist of place names. (The "C" following the place name stands for "City", the "A" for "Area".) The cells in column C represent the population of the city or area, as the case may be. I've formatted the cells in column C as numbers. Albury (C) 44887 Armidale Dumaresq (A) 24596 Ashfield (A) 40258 I want to sort the placenames in order of their po...

Locking folders
Is there any way in Windows Live Mail to lock the folders so they can't be so easily deleted, accidentally? I have done this several times because the vague, fuzzy highlight colors aren't attention getting enough to keep me from thinking I'm deleting a specific message but end up deleting the entire folder. I would think that there should be a way to set the folder options such that I would have to approve a folder deletion before it became final, but this is not so..... Thanks, Gordon No locking. But you can create folders in the "Storage Folders" section an...

Tab Control Subform SetFocus
My main form has a tab control which has a subform embedded in datasheet view. The main form (frmNewProd) has a combo box (cboShift). I want to make a selection in the combo box, hit <enter> and set the focus to the first field (WorkstationID) of the first record in the empty subform (sfmProdOp) which is embedded in the tab control (tabProdDetails). I have tried attaching the following code to the AfterUpdate event of the combo box on the main form: Private Sub cboShift_AfterUpdate() Me!sfmProdOp.SetFocus Me!sfmProdOp.Form!WorkstationID.SetFocus End Sub but it doesn't go ...

Text Function with Different Formatting for Number
I'm trying to use a text function where I reference a number from another cell but I need the text part to be bold and the number not to be bold. This is the formula I'm using right now: ="Sales: "&TEXT(A16,"$#,##0_);($#,##0)") Unfortunately, excel won't let me just make the text bold without making the number bold. Anyone have any suggestions? Thanks M, I think a macro could do this, since it's really a string you're going to wind up with. But if you can put the Sales: part in a separate cell, life will be much easier anyway. then you ...

Adjusting column widths to fit text plus extra space
I can get Excel to adjust one or more columns to fit the data by selecting the columns and double-clicking on one of the column header borders. The result is the smallest possible width for the existing data. This is a little too tight for optimum viewing. Is there a way to tell excel to choose a width that is slightly wider? In Word, there is a *Cell Margin* setting for tables. Is there anything similar in Excel? Column Auto-width has no cell margins parameters that can be set. Gord Dibben MS Excel MVP On Tue, 14 Jun 2011 06:50:36 -0700, Jennifer Murphy <JenMurphy@geospace.org>...

microsoft picture it box pops up when I hit send mail
When I try to send mail, Microsoft picture it box pops up and my computer searches the A drive. I have to cancel this 3 times before I can get rid of the box. Then a box comes up informing me that spell check cannot be completed. Finally I can send the e-mail. What is going on? Any help would be much apprciated ...

Combo and text box dependency
On my form I have a combo box (cboRepairType) which retrieves its list from field(1) of tblGrips. Once the selection has been made (AfterUpdate I presume) I would like the corresponding value from field(3) of tblGrips to display in a text box (txtSellPrice), (or would another type of display be more appropriate?) Can this be done? Please be gentle I am a novice at this :-) Sandy Hi Sandy, Yes, it can be done. Use the Afterupdate event procedure, as you have indicated. In VBA code, the columns are "zero-based", so the first column of the rowsource would be column(0), the s...

how do I get a custom message box to open?
I have a form/subform where I need to have the event and date entered on the main form before information can be entered into the subform. How do I get a custom message box to pop up instead of the generic "You must enter a value in the ... field" when the event and date have not been entered? I think that the order I want to do things in is the following. Help with the actual VBA would be very much appreciated. - What event to use? - check to see if AtEventID is null - do I need this step? Because both the date and event fields are required, Access automatica...

locking up #2
outlook downloads my email o.k. then locks up and wont let me read it. if I close outlook then restart it seems to work o.k. any ideas "Baz" <Baz@discussions.microsoft.com> wrote in message news:F7B133C4-7B1F-48E3-B5F1-762EEA392AAD@microsoft.com... > outlook downloads my email o.k. then locks up and wont let me read it. if > I > close outlook then restart it seems to work o.k. any ideas Hi - This isn't giving us much to work with. When you post in here, always include your version, SP level, and mode (if applicable) of Outlook - you can find this informatio...