Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help ....
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00152575
Message ID:
00152582
Views:
17
Charles,

For the first problem, in the VALID() method of your NAME field, do a lookup in Address. Store the values for Address, City, etc. to the correct fields, then do a REFRESH on those fields on the screen:

For the second, you put different code into the valid:
Name.Valid()
cName = this.value
Seek cName in Address
if found()
   this.parent.address.value =address.address
   this.parent.city.value = address.city
   ...
   
   this.parent.city.refresh
   this.parent.address.refresh
   ...
else
   ** Name not found
   sele ADDRESS 
   INSERT ....  (code to add new record)
       OR
   Do Form AddressEdit    && in add mode
endif
HTH
Barbara



>Hello,
>
>Im in the middle of making a program and ran into a problem.
>
>What I have is a table named "Address" , it contains the fields ,
>
>Name
>Address
>City,State
>P.O Number
>
>On my main screen named "Msa_main" , where the "Address" table is located I have 'Name' as a combo box , this way they can type in a name or scroll through the list for a name..
>
>Now what I want it to do is :
>
>when you enter a name and hit tab ( or whatever key ) if it exists in
>"Address"database in the "name" field , then fill in the 3 other fields .
>
>Another problem Im having is when there's a name that dosent exist and you type in a new name , it's not storing it in the name field , or in the database , it's storing the new 'Address',CityState,P.o Number' but not the 'Name' field.
>
>Could someone please help me out with this ..
>
>Thank YOu.
>
>Charles Simmons
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform