[AccessD] My form has a little problem

DWUTKA at marlow.com DWUTKA at marlow.com
Thu Jan 19 10:25:04 CST 2006


How are you populating the unbound combobox?

Drew

-----Original Message-----
From: Tina Norris Fields [mailto:tinanfields at torchlake.com]
Sent: Wednesday, January 18, 2006 5:11 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] My form has a little problem


Hi all,

I have a form for either creating a new student profile, or editing an 
existing one.  To create a new profile, the user clicks a button that 
opens the student information form in add mode.  To edit an existing 
profile, the user selects the student's name from an unbound combo box, 
and then clicks the button to open the student information form for that 
student in edit mode.

When I first made this little form, it all worked well, but it no longer 
works just right.  If I select a student's name from the combo box, and 
I try to click the button to open the student information fomr, the 
button does not get the focus - it does not respond.  If I wait around 
for a while, eventually the button will let me click it.  If I tab out 
of the combo box, the focus will shift to the the buttons in their 
established tab sequence.  

I remember there have been heated discussions on this list about unbound 
controls.  I am ready to learn - do I have a problem because I'm using 
an unbound control?  

This is what my button does when I can get it clicked:
==========
Private Sub cmdEditExistingStudentProfile_Click()
On Error GoTo Err_cmdEditExistingStudentProfile_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmStudentInformation"
    stLinkCriteria = "[StuID]=" & Me![cboFindStudent]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdEditExistingStudentProfile_Click:
    Exit Sub

Err_cmdEditExistingStudentProfile_Click:
    MsgBox Err.Description
    Resume Exit_cmdEditExistingStudentProfile_Click
   
End Sub
===========

Should I be adding an After Update event procedure to my unbound combo 
box - to set the focus on the button to get the student information form?

Thanks for whatever lessons you will send my way.

Tina

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list