Link VB text box to Data Set
Link VB text box to Data Set
(OP)
Hello!
I am trying to take the data from an edit box, edt1.text and enter it into a field Product ID in my datagrid. This will then go to my Access database. I can do the second part but not the first.
I have added in a data binding link from the edit box to the field, so when i type the data manually it will update in the database. I am thinking of using an SQL statement to do this but I can't seem to get it correct....
Any help would be great...
Pam
I am trying to take the data from an edit box, edt1.text and enter it into a field Product ID in my datagrid. This will then go to my Access database. I can do the second part but not the first.
I have added in a data binding link from the edit box to the field, so when i type the data manually it will update in the database. I am thinking of using an SQL statement to do this but I can't seem to get it correct....
Any help would be great...
Pam





RE: Link VB text box to Data Set
With len(a$) you get the length of the string in ed1.
Alternativelly you assign to the pointer to the start point of the character string in ed1 a very large value, larger then the last character in your string, like
Let ed1.SelStart=30000
in this case it will give you back the position of the last character and you can intercept the result easily by
lastcharacter=ed1.SelStart
Again you get the length of the character string.
Maybe there is a more elegant way but I do not know it.
From now on it is routine: you should find separators among data fields( space? comma?...?)and move each group of characters that represent a single data into whatever cell you wish.
m777182