Showing Forms

  • Thread starter Thread starter gazza52_2000
  • Start date Start date
G

gazza52_2000

Guest
Hi

i am creating a knowledge base for IT Problems.

On my main form i have a combo box which has different options within it.

I have a second form.

I have linked the second form onto my main form using the subform function and set the second form to not visible on its properties.

Basically what i want to do is when i click the option 'Other' in my combo box i want the second form to be shown within my main form.

I have managed to do this when i click any option on the combo box but i dont know how to load it just by clicking on the 'Other' option.

Thanks

Gazza :)
 
Well it all depends on what your Combo is based on. Is it a table or value list.

If it is a table are you bound to the text or Id(if you have one).
 
Ok
Her it is if you are based off a table bound to an Id field Use this
You can use the after update or the Change event what ever you want.

Code:
Private Sub Problem_Change()
If Me.YourCombobox.Value = The Id Number for Other Then
Me.SubForm.Visible = True
Else
Me.SubForm.Visible = False
End If
End Sub

If it's text use this
Code:
Private Sub Problem_Change()
If Me.YourCombobox.Value = "Other" Then
Me.SubForm.Visible = True
Else
Me.SubForm.Visible = False
End If
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom