Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box still not Combo'ing
Message
De
21/03/2019 10:17:00
 
 
À
21/03/2019 09:55:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01667365
Message ID:
01667462
Vues:
57
>lname = Thisform.TxtLName.Value
>fname = Thisform.Text2.Value
>SELECT officer
>SET ORDER TO FULLNAME && PADR(UPPER(LASTNAME),25)+PADR(UPPER(FIRSTNAME),25)
>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 &&This returns 2 rows
> If Reccount() = 1
> ** YOU WILL NORMALY FIND 1, AS I DONT SUPPOSE THERE ARE MULTIPLE PERSONS WITH SAME FNAME+LNAME IN YOUR OFFICER.DBF
> Thisform.editmode = "Edit"
> Thisform.fillin() &&PLEASE SHOW THE CODE FOR THIS METHOD
> ELSE
> ** THIS WILL ONLY GET ACTIVATED WHEN THERE ARE >1 RECCORDS IN CURSOR Countit, VERRY UNLIKELY IN NORMAL USE
> Thisform.lblSelectPerson.Visible = .T.
> Thisform.cboSelectPerson.RowSource = '' && added per previous suggestion
> With Thisform.cboSelectPerson
> .RowSourceType = 6
> .RowSource = "Countit.lastname, firstname, DOB, empcnty" && YOU ARE MIXING 2 DATASOURCES HERE: CURSOR Countit AND TABLE officer
> .ColumnCount = 4
> .ColumnWidths = '150,150,75,150'
> .Visible = .T.
> .ListIndex = 1
> Endwith
> Endif
>ELSE
>** THERE IS NO CODE FOR NOT FOUND
>Endif
>
>And I dont think you should put this code in the lostfocus, if the field involved is bound to the table officer.
>
>Regards,
>Koen

Fields are not bound
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform