Discussion Locked

VB - Data Grid

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Using ADO

I have made a form - contains listbox and from selecting a record it should add records
to datagrid (connected to other table of a record set), when it is in Edit Event.

On editing, it should add new records to
the existing record.

What it currently is doing it replaces the existing record instead of adding a record.

Want to know how to add new record in data grid.

Thanks,

Lad

5 replies

by donq

Data Grid has NOTHING to do with the number of records an object contains. I suggest you begin at the beginning and read a "how-to" VB book from cover to cover? The Grid affects "Smap to Grid" object placement on Forms???

by lo

Hi - Been a while since I did VB and DB. As I remember, to get an add done, you need to invoice an Add Record (forget exact syntax). This creates a new record to populate. If you don't do that, the grid changes modify the current record. Don't remember if there is always a record that is current, but I think there was/is. Look in help for a DB Add Method or New. As I said, it's been a while and I don't remember the specifics but symptoms appear the same as when I was playing with a VB/DB application.

If you can't find, post a comment or email me and I will see if I can find in an old app.

This discussion is closed to new replies.