From: Michael Smith on 8 Sep 2009 00:37 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.eset.com
From: Ralph on 8 Sep 2009 12:55 Michael Smith wrote: > 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 > "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.freevbcode.com/ShowCode.asp?ID=3518 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
From: Ralph on 8 Sep 2009 21:35 "Michael Smith" <mick_smith(a)iinet.net.au> wrote in message news:4aa5df8f$0$27602$5a62ac22(a)per-qv1-newsreader-01.iinet.net.au... > 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? > "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.freevbcode.com/ShowCode.asp?ID=3518 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
|
Pages: 1 Prev: Print Zebra printer LP2824 USB from VB 5 Next: Treeview of timestamped files |