Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo/List box giving erratic results
Message
De
24/02/2006 16:10:32
 
 
À
24/02/2006 15:27:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01099032
Message ID:
01099048
Vues:
15
Crate a Combo (or ListBox if you want users to see many records)
Set these properties to Combo (or listBox):
BoundColumn   = 2
BoundTo       = .t.
RowSourceType = 6 && Fields
RowSource     = [Ship_To.Address, ship_to_no] && Second field is w/o alias
ControlSource = [Order.Ship_to_no]
ColumnCount   = 2
ColumnWidths  = [200,50] && or whatever you want
The just go through order's records. No relation is neccessary.



>Hi all,
>
>On an order-entry form I'm designing, there's a place for a ship-to address to be chosen. Some of our customers have several ship-to addresses, so I have a seperate file set up for those. For example:
>
>order.order_no
>order.cust_no
>order.ship_to_no
>
>ship_to.cust_no
>ship_to.ship_to_no
>ship_to.address
>
>If the user enters a cust_no and ship_to_no in the Orders table, it takes the cust_no and ship_to_no to find the appropriate address in the Ship_to table and returns it. No problems.
>
>But I wanna give the users the opportunity to browse the Ship_to table in case they don't know which ship_to_no they wanna use, and that's where the problems start.
>
>The first thing I tried was a simple command button that had a click event of:
>
>return_to=sele() && saving old work area (Orders)
>sele ship_to
>brow nomo
>sele(return_to) && returning to Orders
>
>But upon refreshing, it wouldn't return me to my Orders table for some reason. So, I tried creating a combo box to let them browse through the Ship_to table. This works on most records, but for reasons I can't figure out, it doesn't work for a handful of records. The cust_no and ship_to_no in the Orders table are in the Ship_to table, so it's not like it's looking for a record that doesn't exist. And I've got a relation set up between Orders and Ship_to.
>
>Anything I should be looking for? Or is there a better way to go about this?
>
>Thanks very much!
>
>John
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform