Option Group question 03-19-08

I have an option group with 3 choices and next to each choice I have a
textbox ( 3 in all). I imagine this is simple, but I'd like to have
for whatever checkbox in the optiongroup that is chosen the textbox to
the right of it be enabled, while the other two are disabled.

optiongroup name is OptGroupFreight
optionvalue 1 is check52 textbox is FreightTLQuantity
optionvalue 2 is check54 textbox is FreighthalfLTLQuantity
optionvalue 3 is check56 textbox is FreightthirdLTLQuantity

Thanks in advance.

Ryan
0
ryan
3/19/2008 6:14:13 PM
access.formscoding 7493 articles. 0 followers. Follow

5 Replies
661 Views

Similar Articles

[PageSpeed] 1

You might use something like this in the current event of your form;

Me.FreightTLQuantity.Enabled = Me.OptGroupFreight = 1
Me.FreighthalfLTLQuantity.Enabled = Me.OptGroupFreight = 2
Me.FreightthirdLTLQuantity.Enabled = Me.OptGroupFreight = 3
-- 
_________

Sean Bailey


"ryan.fitzpatrick3@safeway.com" wrote:

> I have an option group with 3 choices and next to each choice I have a
> textbox ( 3 in all). I imagine this is simple, but I'd like to have
> for whatever checkbox in the optiongroup that is chosen the textbox to
> the right of it be enabled, while the other two are disabled.
> 
> optiongroup name is OptGroupFreight
> optionvalue 1 is check52 textbox is FreightTLQuantity
> optionvalue 2 is check54 textbox is FreighthalfLTLQuantity
> optionvalue 3 is check56 textbox is FreightthirdLTLQuantity
> 
> Thanks in advance.
> 
> Ryan
> 
0
Utf
3/19/2008 6:56:00 PM
Private Sub OptGroupFreight_AfterUpdate()
  Select Case OptGroupFreight
   Case 1
     FreightTLQuantity.Enabled = True
     FreighthalfLTLQuantity.Enabled = False
     FreightthirdLTLQuantity.Enabled = False

   Case 2
     FreighthalfLTLQuantity.Enabled = True
     FreightTLQuantity.Enabled = False
     FreightthirdLTLQuantity.Enabled = False

   Case 3
     FreightthirdLTLQuantity.Enabled = True
     FreightTLQuantity.Enabled = False
     FreighthalfLTLQuantity.Enabled = False
  End Select
End Sub
Private Sub Form_Current()
Select Case OptGroupFreight
   Case 1
     FreightTLQuantity.Enabled = True
     FreighthalfLTLQuantity.Enabled = False
     FreightthirdLTLQuantity.Enabled = False

   Case 2
     FreighthalfLTLQuantity.Enabled = True
     FreightTLQuantity.Enabled = False
     FreightthirdLTLQuantity.Enabled = False

   Case 3
     FreightthirdLTLQuantity.Enabled = True
     FreightTLQuantity.Enabled = False
     FreighthalfLTLQuantity.Enabled = False
  End Select

End Sub

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200803/1

0
Linq
3/19/2008 7:09:33 PM
Thank you Mr. Adams that did the trick!

On Mar 19, 12:09 pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
> Private Sub OptGroupFreight_AfterUpdate()
>   Select Case OptGroupFreight
>    Case 1
>      FreightTLQuantity.Enabled = True
>      FreighthalfLTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 2
>      FreighthalfLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 3
>      FreightthirdLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreighthalfLTLQuantity.Enabled = False
>   End Select
> End Sub
> Private Sub Form_Current()
> Select Case OptGroupFreight
>    Case 1
>      FreightTLQuantity.Enabled = True
>      FreighthalfLTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 2
>      FreighthalfLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 3
>      FreightthirdLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreighthalfLTLQuantity.Enabled = False
>   End Select
>
> End Sub
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200803/1

0
ryan
3/19/2008 7:45:41 PM
Glad it worked for you!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200803/1

0
Linq
3/19/2008 10:37:09 PM
I got another question for you regarding this. Now that the text box
that is next to the check mark shows, while the other two are not
enabled, lets say I have a quantity in textbox1 which is check1, or
optionvalue1 in the option group. I can write in a number in text box
1 but i can click check3 and disable the text box that has the
quantity in it. Is there away where if you have a quantity in a text
box you can't select the other two check boxes? I tried this code, it
worked buy disabling the text boxes and check boxes that didn't have
the quantity, but it wouldn't undo when I deleted the quantity out of
the first text box. Does that make sense?

Private Sub Form_afterUpdate()
Select Case OptGroupFreight
Case 1
If (Nz([FreightTLQuantity])) = False Then
  Check54.Enabled = True
  Check56.Enabled = True
  End If
Case 2
If (Nz([FreighthalfLTLQuantity])) = False Then
  Check52.Enabled = True
  Check56.Enabled = True
  End If
Case 3
If (Nz([FreightthirdLTLQuantity])) = False Then
  Check52.Enabled = True
  Check54.Enabled = True
  End If
  End Select
End Sub







On Mar 19, 12:09 pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
> Private Sub OptGroupFreight_AfterUpdate()
>   Select Case OptGroupFreight
>    Case 1
>      FreightTLQuantity.Enabled = True
>      FreighthalfLTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 2
>      FreighthalfLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 3
>      FreightthirdLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreighthalfLTLQuantity.Enabled = False
>   End Select
> End Sub
> Private Sub Form_Current()
> Select Case OptGroupFreight
>    Case 1
>      FreightTLQuantity.Enabled = True
>      FreighthalfLTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 2
>      FreighthalfLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreightthirdLTLQuantity.Enabled = False
>
>    Case 3
>      FreightthirdLTLQuantity.Enabled = True
>      FreightTLQuantity.Enabled = False
>      FreighthalfLTLQuantity.Enabled = False
>   End Select
>
> End Sub
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200803/1

0
ryan
3/20/2008 3:59:40 PM
Reply:

Similar Artilces:

Networking 08-07-03
I have a question, please I have three computers and a printer networked pair-to pair, I wanted to add an additional printer of this same model to the same network. Please furnish me with the step by step approach, how to accomplish this task. I appreciate and anticipate your reply ...

2 Font Questions
I have a visually challenged user whose laptop died on her. She is using Outlook 2000 SP3 on Windows XP SP1 against an Exchange 5.5 SP4? environment. On her old laptop, she had made quite a few changes to her display to make it easier to read. We have been able to recreate all of those settings with the exception of two. The first is the To: and CC: buttons and the subject header on the New Message form. Those are maintaining their old default size. The other is the whole Address Book window that pops up when you click on the To: or CC: controls. All of those are the small default sizes...

Golf Handicap question
I posted this under a different heading, but am posting it under the Golf Handicap in hopes of finding someone who has a spreadsheet that will calculate Handicaps. I wrote a spreadsheet in Quattro Pro X3 to calculate Golf Handicaps. I have imported it to Excel 2007 but I can't get one formula to work. The formulas for calculating Index, Differential and Handicap work fine but the formula to find the loewst 10 scores from the last 20 rounds played doesn't work. In the spreadsheet I have calculated the differentials in column 'H' starting at row 6 and am trying to put t...

Outlook 2007 To Do Bar question
I'm wondering if it's possible to get items from a shared calendar onto the To Do Bar in Outlook 2007. The calendar events wouldn't be assigned to me, so they wouldn't strictly be my to do's, but I would like to see the to do's from another calendar. Is this possible? -- chuskey No. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, chuskey asked: | I'm wondering if it's possible to get items from a shared calen...

Show group demand/availability in ressource graph
Hi! I would like to see, in the ressource graph, the demand and availability line for a whole group, and not just individual ressource. When I select multiple ressources, I only see them invidually in the ressource graph. I would like to see the total demand and total availability. Many thanks! Mathieu Hi, Read FAQ 38 on http://www.mvps.org/project/faqs.htm -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf "Mathieu936" <mathieu936@gmail.com> wrote i...

Remove Blank Pages 03-26-07
Hi, I am currently creating a dynamic report which can be a variable length depending on options the user selects. This means the form can be between 1 and 3 pages in length. The problem I am having is that if I set the report to be 1 page in length I get an error if a control is placed on the second page (because the form is not long enough) and if I set the report to be 3 pages in length I geet 2 blank pages when I print the report. The controls are created and moved dynamically using VBA scripting. The two solutions I can think of is some way to increase the report size using VBA or hav...

query question
Can I create a query that will replace @abcwest.com with @abcbest.com in the table Customer column email and cc ? Thank you "fniles" <fniles@pfmail.com> wrote in message news:%23rGu6FUHLHA.3732@TK2MSFTNGP02.phx.gbl... > Can I create a query that will replace @abcwest.com with @abcbest.com in > the table Customer column email and cc ? > Thank you Yes. Have a look in the BOL index under string functions. UPDATE tblCustomer SET EmailAddress = REPLACE(EmailAddress , '@abcwest.com', '@abcbest.com') WHERE CHARINDEX('@abcwest.c...

Disabling the View code option
How to disable the view code option for the worksheets . This is to prevent the user of the workbook from seeing the code. I know that a password can be kept , but disabling it seems to be a better option. Your comments/ suggestion are welcome... --- Message posted from http://www.ExcelForum.com/ If it is the formulae contained in the cells of your worksheet that you want hidden then you need to select the cells concerned and then using <Format><Cells> select the Protection tab and ensure that the Locked and Hidden boxes both have ticks in them. You then pasword lock the shee...

Question regarding IIf
Hello all. Im not very good at querys, so pls dont laugh. ;) I cant really get it to work. Is it at all possible to do this? ArtNr: IIf([ArticleNumber]="600#######";Left([ArticleNumber];LEN([ArticleNumber])-2);Left([ArticleNumber];LEN([ArticleNumber])-3)) In my desperation I have also tried Format, but the same thing happends. It uses the Left with LEN -3 all the time. Any suggestions? If the # is meant to be a wild card representing any digit, use the Like operator: ArtNr: IIf([ArticleNumber] Like "600#######", ... If ArticleNumber is a Number field (not a Te...

Twice Monthly Deposit Question
I get paid twice a month, on the 15th and the last day of the month. However, if either of those dates falls on a weekend or holiday, we're paid the first workday before that date. How do I set this up in Money 2004? Thanks! Set it up for a 31st and tell it twice a month. Money will then get the 15th/last day part right. The weekends and holidays have to be adjusted by hand. There is no better way. <anonymous@discussions.microsoft.com> wrote in message news:185001c47c1c$6d8d93e0$a301280a@phx.gbl... > I get paid twice a month, on the 15th and the last day of > the month. Ho...

List Box Options
I'm designing a form that's used for tracking training for various individuals, and their names were added to the simple list box. My question is how do I show the selected names from the list box in the database column marked "Names"? All I wnt to accomplish when I'm done is a report that shows how many trainings each individual attended the date of the trainings an it's topic. -- Scott Scott: Your going to have to have a criteria in order to tell it what you want done. "Scott" wrote: > I'm designing a form that's used for tracking ...

Filtering incoming email questions
I'm about to set up an Exchange server for the first time on SBS 2003. The client wants to know if an email is sent to more than one person, can we have a rule/filter that delivers it only to the first addressee and no one else? Basically not allow mulitple addressees of any kind, either in the main "to:" field, the "cc:" field, blind copy, etc. It would be nice if this was configurable by the user but if it had to be policy for the whole Exchange server site, that would be OK, too. Apparently their customers are making a habit of sending things to mulitple em...

Excel97 Conditional formatting question
Using conditional formatting, I need to know if this is possible: If the value of cell A1 is is between the value of B1 and 2500 then I want to set the font color and background color of cell A1 to some other color than the default. -- Zilbandy - Tucson, Arizona USA <zil@zilbandyREMOVETHIS.com> Dead Suburban's Home Page: http://zilbandy.com/suburb/ PGP Public Key: http://zilbandy.com/pgpkey.htm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Just use the Between condition, with bounds of =B1 and 2500. -- HTH Bob Phillips (replace somewhere in email address with g...

Another "esthetics" question!
How can I change the Windows Startup sound in Win 7? I've been able to change "Logon" and "Logoff", but can't find any default setting for the "Startup" .wav so I can change it. "jetjock" <jetjock@hanger.com> wrote in message news:5ps4r5pa6q3ms1n1igbu2hqbsho0s888it@4ax.com... > How can I change the Windows Startup sound in Win 7? I've been able to > change "Logon" and "Logoff", but can't find any default setting for > the "Startup" .wav so I can change it. It's hard-coded into i...

Rich Edit Control 3 Unicode question
Hi there I'm using CRichEditCtrl in my MFC Dialog application on windows XP. When I paste certain unicode characters (such as greek, hebrew, or arabic, the French Franc currency symbol) etc, I initally see the symbol correctly in the control, but when the control loses focus, the unicode character gets replaced with a '?'. I am iniitlaising the control with AfxInitRichEdit2(). Any ideas on how I can get the control to retain unicode characters ? Thx for help. Charles A couple things for starters: 1) Must be creating a Unicode build 2) Must have _RICHEDIT_VER defined in the pr...

Well that's strange... TAB question
For no apparent reason, my Excel at work has started misbehaving. If I am in, say, A1 and hit TAB, instead of going to cell B1, I go to R1. Can anyone explain this, or tell me how to put it right. TIA Steve Protection? -- Don Guillett SalesAid Software donaldb@281.com "CrankyLemming" <crankylemming@aol.com> wrote in message news:fc55430.0411300627.1ac59e22@posting.google.com... > For no apparent reason, my Excel at work has started misbehaving. > > If I am in, say, A1 and hit TAB, instead of going to cell B1, I go to > R1. Can anyone explain this, or tell me h...

compile error 01-18-08
Hi, I am trying to filter a report using a form's filter, following instructions I found on the internet. I am however running into compile error: end if without block if. The code as it appears in my database is: Private Sub cmdOpenReport_Click() If Me.Filter = "" Then MsgBox "Apply a filter to the form first." Else DoCmd.OpenReport "rptCustomers", acViewPreview, , Me.Filter End If End Sub and here is the code from the internet Private Sub cmdOpenReport_Click() If Me.Filter = "" Then MsgBox "Apply a filter to the form first...

Grouping while Sheet protected
Is there any way of allowing users to a shared worksheet to use the grouping feature for my columns while the sheet is protected? B Because you can't change the protection in a shared workbook, you won't be able to use the grouping feature on a protected sheet. In a workbook that isn't shared, you can run a macro as the workbook opens, to apply protection and allow grouping. Here's some sample code posted by Dave Peterson: Option Explicit Sub auto_open() With Worksheets("sheet1") .Protect userinterfaceonly:=True .EnableOutlining = True ...

Question about possible memory leak
I have an MDI application that uses the following functions to display the file's name and small icon in a statusbar pane. My question is, in the SetPanelIcon() function I added a call to DestroyIcon(). It is necessary to prevent a memory leak? The MSDN files state that CStatusBarCtrl::SetIcon sends a SB_SETICON message and that "The status bar will not destroy the icon. It is the calling application's responsibility to keep track of and destroy any icons." // In the view.cpp void CMyAppView::SetDocumentIcon() { CMainFrame* pMainFrame = (CMainFrame*) ::AfxGetMainWnd();...

In Excel
Am unable to scroll uisng Mouse Scoller.Please let me know the option to enable this. Is the window pane frozen? --JP On Aug 4, 7:38=A0am, Rojas <Ro...@discussions.microsoft.com> wrote: > Am unable to scroll uisng Mouse Scoller.Please let me know the option to > enable this. ...

Hide group addresses
I have a group list of of 20 names. How do I hide the names and addresses so that the twenty people doesn't get all the other 19 addresses when an e-mail is sent out to the group? Thanks, Frank. Place the distribution list in the BCC (Blind Carbon Copy) field when sending "FJ Shepley & JM Pfohl" <fshepley@netscape.ca> wrote in message news:43231c6a_1@netscape.ca... >I have a group list of of 20 names. > How do I hide the names and addresses so that the twenty people doesn't > get > all the other 19 addresses when an e-mail is sent out to the grou...

Excel Options aren't sticking
I have to go in every session to reset my "Excel Options" so that page breaks are shown (it's under Advanced). Why does this not stay set when I exit? I'm sure it was a design choice by the developer. Personally, I like that choice. But if I want to see the page breaks, I don't go through the menus to turn it on. I just hit the print preview button. LWilkinson wrote: > > I have to go in every session to reset my "Excel Options" so that page breaks > are shown (it's under Advanced). Why does this not stay set when I exit? -- Dave Pete...

Combo Box Question 12-19-09
I have several Combo Boxes that need to use the same choices. Is there a way to only use this code 1 time & all the Combo Boxes offer the same choices or do i have to enter this code for every Combo Box? My Combo Boxes are "Type_Work_601-623" & "Type_Work_701-723" 'Type Work to be Done With Me.Type_Work_601 .AddItem "ADD:" .AddItem "ASSIGN:" .AddItem "EXTEND:" .AddItem "MODIFY:" .AddItem "MULTIPLED" .AddItem "REASSIGNED" .Ad...

Form/Query Question
In Access 2007, I have a table that has the following columns: First Name, Last Name, Date of Birth, Hair Color, Height, Weight, and Current Location. I want to create a form that I can go into and find all of the individuals that were born after 1980 and with brown hair; or possibly all the individuals with brown hair that weigh under 180. Basically I want to be able to search the table based on inserting the specific parameters I want into a form. And then I want to be able to see a report of all the individuals that meet my parameters to print out. How can I go about this? Y...

advanced filter question
Hello all again, I've got some data in column A, sheet3 and I have the following code (that works without problem) Sub FilterUniqueItems() Dim i As Integer Dim list As Variant Dim DataRange As Range Set DataRange = Worksheets("sheet3").Range("A1:A10") list = DataRange.AdvancedFilter(Action:=xlFilterCopy, Copytorange:=Worksheets("sheet3").Range("B1"), Unique:=True) End Sub Is it possible to determine (programatically, I mean) how many and what values the advancedfilter extract? I'd like to treat the data before pasting it into Excel. ...