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 does not show up on the DataGrid !!!

Status
Not open for further replies.

sarah77

Programmer
Jun 4, 2002
36
0
0
US
I created a data environment (de) contains two commands(Pc.Mdb) & (Items.mdb) contains two table (Items) and (Pc):
- De
- Pc
- Items

A data grid called (GrdPc) is linked with (Pc) table so the
GrdPc.DataSource=De
GrdPc.DataMember=Pc

The properyies of grid of Allowed...=True for everything.

My problem is when the data inside the table (Pc) does not reflected in grid (i.e does not show up) ??.

* Clear an old data from Pc table
if De.RsPc.State=1 then
De.RsPc.Close
endif
De.RsPc.Source="Delete * from pc"
De.RsPc.Open
* Now import a new data into table Pc
if De.RsItems.State=1 then
De.RsItems.Close
endif
De.RsItems.Source="select * from items"
De.RsItems.Open
Do while De.RsItems.Eof=False
De.RsPc.AddNew
De.RsPc.Fields("Code")=De.RsItems.Fileds("ItemCode")
De.RsPc.Fields("Desc")=De.RsItems.Fileds("ItemDesc")
De.RsPc.Update
De.RsItems.MoveNext
loop
GrdPc.Refresh

After that when I looked to the table (Pc) physically the data is there but it does notw show up on the grid ???.

Any comment will be much appriciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top