[AccessD] My form has a little problem

Tina Norris Fields tinanfields at torchlake.com
Thu Jan 19 10:07:59 CST 2006


Hello William,

The row source for the combo box is:
SELECT qselStudentName.StuID, qselStudentName.Name
FROM qselStudentName
ORDER BY qselStudentName.StuLname;

The query qselStudentName looks like this:
SELECT tblStudent.StuID, tblStudent.StuLname, tblStudent.StuFname, 
tblStudent!StuLname & ", " & tblStudent!StuFname AS Name
FROM tblStudent;

So, from the table tblStudent, I have selected the PK, last name and 
first name, and added a field called Name which chains together the last 
and first names - creating my query qselStudentName.  For the combo box 
I have selected the PK and the Name field, from my query and ordered the 
display by last name.  Do you see something here I have screwed up?

Thanks for looking,
Tina

William Hindman wrote:

>...sounds more like a problem with the table or query on which the combo is 
>based.
>
>William
>
>----- Original Message ----- 
>From: "Tina Norris Fields" <tinanfields at torchlake.com>
>To: <accessd at databaseadvisors.com>
>Sent: Wednesday, January 18, 2006 6:11 PM
>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, trhe 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