Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I navigate a View?

Status
Not open for further replies.

aiden

Programmer
Apr 23, 2001
27
CA
HI,

I have a listbox containing employees. When I select an employee, I want employee data to fill the corresponding text and combo boxes in the rest of the form. If I bind the fields to 1 table and use SEEK(), it's easy to automatically populate these controls. However, the data comes from several tables, so I want to bind the fields to a View. But how can I quickly navigate through the view when an employee number is selected in the listbox?

Filtering the view and requerying it everytime a selection is made in the listbox seems inefficient especially since the base tables are on a network. The text and combo boxes have to be updateable.

Thanks in advance.
 
A view is merely an updatable cursor. It should work the same as a table, if the view contains all data.

So just bind the fields to your view.

HTH,

Weedz (Wietze Veld)
My private project:CrownBase source code can be downloaded !!
 
1. If the view is indexed, you can make a seek just as you do on a table.
2. You can use a LOCATE FOR myEmpCode= whatever, if the view is not indexed
3. Binding the view fields to your textBox or ComboBox is as you do it for your tables.
3. Now the question is making th view UPDATABLE.

Now open your project
-> Select Data TAB
-> Open the DATABASE ->Local Views -> your said view
-> Click on modify
->Select the update criteria
->Click on the key field (just below th key pcture)
->Select Update ALL fields or the fields you want to update... the rest of help you can understand fom the screen...

Now the view is updattable.
Hope this helps :)
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Hi Weedz.

I had initially populated my listbox from an array. The form works much better when I bind the listbox to the same view as the rest of my controls.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top