VB 6 (subform & option button question)

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Helen Eyob

Thread Starter
Joined
Jul 26, 2004
Messages
11
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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top