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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Entry Grid 1

Status
Not open for further replies.

rickbras

Programmer
Mar 16, 2000
12
0
0
US
I guess my advanced age is affecting my ability to understand logic, but.... I can't seem to get my one-to-many grid to allow me to enter data. I have it at the bottom of my form and all else seems to work correctly. However, when I try to go back and add data to existing records in the grid or to new records in the grid it does not seem to come into focus. I can add all the other data in the form, but it balks at the grid. I can edit existing data in the grid with no problem. Any and all help would be most appreciated.<br>
<br>
Oops! I almost forgot, I am using VFP 3.0b.<br>
<br>
Rick
 
The most of the time I try not to use grids beceause they're a real headache. However when there is no other way and I have to program a one-to-many grid I use parameterized views to load data into the grid. The parametrized views are easier to refresh and the data is easier to be handled.<br>
<br>
Try something like this<br>
<br>
<br>
Create View &lt;myviewname&gt; As<br>
Select * From &lt;Table1,table2&gt;<br>
Where &lt;condicion1,condicion2&gt; and<br>
&lt;field1&gt; = &lt;?tParametro1&gt;<br>
<br>
<br>
At Runtime<br>
<br>
1. Put the view in dataenvironment<br>
2. Set the NoDataOnLoad of the cursor to .t.<br>
3. When you want to load the data in the grid. First create the parameter variable and then issue the command <br>
Requery(&lt;cViewName&gt;)<br>
4. Refresh the grid.<br>
<br>
<br>
I am not american, so please forgive me if my English isnot good enough.<br>
<br>
I hope it helps <p>Edwin Dalorzo<br><a href=mailto:edalorzo@hotmail.com>edalorzo@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top