Combobox not working (1 Viewer)

solnajeff

Registered User.
Local time
Today, 21:30
Joined
May 22, 2007
Messages
33
Hi

I have a question regarding comboboxes, and also text boxes.

I have a form where users can select the report they wish using option buttons, no problem there.

The option buttons relating to individual students have code attached to the on focus and lost focus events to hide or show a picture of the student , a combobox containing their names and a text box with student ID. They all display or hide correctly. However the dropdown for the combobox does not work.The source for the combobox is a select query.

If I delete the focus events the combobox works correctly.

I would be interested to know if anyone else has come across this behaviour and also if it is possible to correct it.

Many thanks

Jeff
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:30
Joined
Oct 29, 2018
Messages
21,358
Hi Jeff. It's hard to imagine why the combo would not work without seeing it in action. Besides, what does "not work" mean?
 

solnajeff

Registered User.
Local time
Today, 21:30
Joined
May 22, 2007
Messages
33
Hi

Sorry for not explaining as well as I could have.

I have prepared a sample to illustrate the problem. with the focus events commented out the combobox works correctly. With the focus events working the combobox locks up and no drop down.

Really odd behaviour

Regards


Jeff
 

Attachments

  • Sample.accdb
    496 KB · Views: 49

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:30
Joined
Feb 19, 2002
Messages
42,971
When working with an option group, you do NOT reference individual option buttons. You reference the option group value

Code:
Private Sub frameRep_Click()
Select Case Me.frameRep
    case 4
        Me.cbStudentName = Null
        Me.cbStudentName.Visible = True
        Me.labStudentName.Visible = True
    Case Else
        Me.cbStudentName = Null
        Me.cbStudentName.Visible = False
        Me.labStudentName.Visible = False
End Select
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:30
Joined
Oct 29, 2018
Messages
21,358
Hi

Sorry for not explaining as well as I could have.

I have prepared a sample to illustrate the problem. with the focus events commented out the combobox works correctly. With the focus events working the combobox locks up and no drop down.

Really odd behaviour

Regards


Jeff
Hi Jeff. Did Pat's suggestion help? I just wanted to check before I look at your file. Cheers!
 

Users who are viewing this thread

Top Bottom