There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freezes freezing hard drive hardware hijackthis internet internet explorer itunes laptop malware monitor motherboard mouse network networking outlook 2007 power printer problem ram router screen slow sound spyware trojan usb virus vista vista 32-bit windows windows xp windowsxp winxp wireless
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB 6 (subform & option button question)


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Helen Eyob's Avatar
Junior Member with 11 posts.
 
Join Date: Jul 2004
Experience: Beginner
10-Sep-2004, 02:43 PM #1
Access 2000 (subform & option button question)
Hi,

There is a form, which has different sub-forms on it. The function below loads these different sub-forms when a user selects the sub-form names from the menu. It works perfectly. What I want in addition to loading the selected sub-form is, to select an option button depending on the sub-form selected. But now, all it does is select the first option button for all the sub-forms. I’ve tried “If statement”, “Case Select”, “ISLoaded”, and “Visible” methods none works… Please advise?

Function CheckBoxUpdate(DISCIPLINES)
On Error Resume Next

Forms!DIF.AllowEdits = True
Forms!DIF![EVALUATION CHECK BOXES].SourceObject = DISCIPLINES & " EVALUATION CHECK BOXES"
Forms!DIF![IMPACT CHECK BOXES].SourceObject = DISCIPLINES & " IMPACT CHECK BOXES"
Forms!DIF![ASCENT Signature].SourceObject = DISCIPLINES & " Signature"

'***New lines of code start here
Forms!DIF![EVALUATION Signature].SourceObject = DISCIPLINES & " Signature"
Forms!DIF![Status] = 1 'option button value
Forms!DIF![CHANGE Signature].SourceObject = DISCIPLINES & " Signature"
Forms!DIF![Status] = 2 ' option button value
'***end here


Forms!DIF![DisciplineSource].Visible = True
Forms!DIF![DisciplineSource].SetFocus
Forms!DIF![DisciplineSource].Text = DISCIPLINES
'MsgBox "DIF# is: " & testing & " & discpline is: " & DISCIPLINES
Forms!DIF![DIF Number].SetFocus
Forms!DIF![DisciplineSource].Visible = False
Forms!DIF.AllowEdits = False
'DoCmd.Save acForm, "DIF"

'**** test below ****


‘If Forms!DIF![EVALUATION Signature].SourceObject = DISCIPLINES & " Signature" Then
‘If Forms!DIF![EVALUATION Signature].Visible Then
If Forms!DIF![EVALUATION Signature].IsLoaded = True Then
Forms!DIF![Status] = 1

'ElseIf Forms!DIF![CHANGE Signature].SourceObject = DISCIPLINES & " Signature" Then
'ElseIf Forms!DIF![CHANGE Signature].Visible Then
ElseIf Forms!DIF![CHANGE Signature].IsLoaded = True Then
Forms!DIF![Status] = 2

End If



End Function

Last edited by Helen Eyob : 10-Sep-2004 03:15 PM. Reason: wrong title: it should read "Access 2000 (subform & option button question)
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 10:16 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.