>>>>>This is getting to be really irritating
>>>>>so...code from lost focus of First Name
>>>>>
>>>>>lname = Thisform.TxtLName.Value
>>>>>fname = This.Value
>>>>>SELECT officer
>>>>>SET ORDER TO FULLNAME
>>>>>SEEK padr(Upper(lname),25) + padr(Upper(fname),25)
>>>>>IF FOUND()
>>>>> Select Lastname, Firstname, DOB, empcnty From Officer ;
>>>>> WHERE padr(Upper(LASTNAME),25)+ padr(Upper(FIRSTNAME),25) = padr(Upper(lname),25) + padr(Upper(fname),25) ;
>>>>> INTO Cursor Countit nofilter
>>>>> If Reccount() = 1
>>>>> Thisform.editmode = "Edit"
>>>>> Thisform.fillin
>>>>> Else
>>>>> Thisform.lblSelectPerson.Visible = .T.
>>>>> Thisform.cboSelectPerson.RowSource = ''
>>>>> With Thisform.cboSelectPerson
>>>>> .RowSourceType = 6
>>>>> .RowSource = "Countit.lastname, firstname, DOB, empcnty"
>>>>> .ColumnCount = 4
>>>>> .ColumnWidths = '150,150,75,150'
>>>>> .Visible = .T.
>>>>> .ListIndex = 1
>>>>> Endwith
>>>>> Endif
>>>>>Endif
>>>>>
>>>>>
>>>>>The label and combobox displays, but the combobox is empty
>>>>>
>>>>>This is the same setup for a combobox that I'm using all over creation, but this is the only one that's not combo'ing. I have checked/compared the properties and all seems to be the same (except for the names, of course)
>>>>>
>>>>>What am I missing? 'Cuz as irritating as this has been, I just KNOW it's something simple
>>>>
>>>>Try to put Thisform.cboSelectPerson.RowSource = '' && added per previous suggestion before you run the query.
>>>
>>>Yeah, no love - combobox still shows empty and no dropdown when clicked on
>>
>>Have you tried calling Refresh() or Requery() method of the control just after assigning RowSource property?
>
>I'll give it a try, but it isn't working from the get-go
Everything seems to be correct, so the problem must be somewhere else. Try dropping a Standard VFP Combobox on the form and use that to compare the results.
In my test neither the line "Thisform.cboSelectPerson.RowSource = ''" is necessary, nor Requery() or Refresh(). It just works, so my assumption is something in the class or some other code in the form that interfers.
Perhaps add another button to browse the cursor at a later point in time. Maybe another query is running into the same alias?
Christian Isberner
Software Consultant