DBgrid in VB6

DBgrid in VB6

Post by Michael Sm » Wed, 09 Sep 2009 13:37:30


Hi all, and thanks in advance for any help

First I am using VB6 and Access 97.

I have a form with a DBList populated from my DB the list is grocery items

I have code that when you CLICK the DBList it will send that value to a
DBGrid which is UNBOUND the DBGid has only one column which is all I need.

My problem how do I move to the next CELL in the DBGrid to ADD more grocery
items?

Any help much appreciated

Mick Smith
Adelaide, South Australia



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4404 (20090907) __________

The message was checked by ESET NOD32 Antivirus.

http://www.yqcomputer.com/
 
 
 

DBgrid in VB6

Post by Ralp » Thu, 10 Sep 2009 01:55:14


"If the AllowAddNew and AllowUpdate properties of the grid are True, then
users can add new records to the grid, and you must implement the
UnboundAddData event. The syntax of this event is as follows:

Private Sub DBGrid1_UnboundAddData(ByVal RowBuf As RowBuffer,_
NewRowBookmark As Variant)

The NewRowBookmark argument is initially Null. However, before returning
from this event, you must set it to a bookmark that uniquely identifies the
newly added row. If you do not set the value of NewRowBookmark, the add
operation will fail and the grid will not allow its current row to change."
From the Apex DBGrid help file

There is a tad more to all this, with Gotchas around every corner. <grin>. I
suggest you down load the following:
"DBGrid Tutorial and Help"
http://www.yqcomputer.com/
It contains the above help file and 10 examples.

All the tutorial projects are easier to work with if you initially create a
single group file.

hth
-ralph

 
 
 

DBgrid in VB6

Post by Ralp » Thu, 10 Sep 2009 10:35:30


grocery

"If the AllowAddNew and AllowUpdate properties of the grid are True, then
users can add new records to the grid, and you must implement the
UnboundAddData event. The syntax of this event is as follows:

Private Sub DBGrid1_UnboundAddData(ByVal RowBuf As RowBuffer,_
NewRowBookmark As Variant)

The NewRowBookmark argument is initially Null. However, before returning
from this event, you must set it to a bookmark that uniquely identifies the
newly added row. If you do not set the value of NewRowBookmark, the add
operation will fail and the grid will not allow its current row to change."
From the Apex DBGrid help file

There is a tad more to all this, with Gotchas around every corner. <grin>. I
suggest you down load the following:
"DBGrid Tutorial and Help"
http://www.yqcomputer.com/
It contains the above help file and 10 examples.

All the tutorial projects are easier to work with if you initially create a
single group file.

hth
-ralph