I have made a database, which i am allowing to add new rows of info, now i have 5 columns.
So i have made a button, which opens a new form, with some text boxes on. I have 5 text boxes on this new form, and i want to be able to fill them in and then press this one button, to add the poece of info from each box into a certain column in the database. But when i click my add button it will only put my first text box in and that is in the first column.
I know why it does this but not how to fix it.
my code for my add button goes:
Private Sub Command1_Click()
Unload Form2
Form1.MSFlexGrid1.Refresh
Form1.MSFlexGrid1.AddItem (Text2.Text)
End Sub
i know it is the (Text2.text) that is the problem, but what do i write as extension to that for the certain column number?
If you understood that please help, if not just ask and i will try explain again.
Sorry i just thought i would keep this up to date. I have still made no progress, so if this isn't answered soon i will post another topic on sorting my database.
ummm i just copied your code into mine and it didn't work, it still puts up the first text box into the first column, but i stil get nothing in the others.
ok i added the new row code, but still i got no text in columns above 0.
So here is my exact problem.
I have a form (form1) it has my database, my database has 5 columns.
I also have a button on form1 opening form2.
Form 2 has on it..: 1 invisible text box (this is the box that goes into the first column, its the ID)
then i have 2 visible text boxes, these two won't go into the columns.
i also have to combo boxes, but these i will worry about after.
So i am trying to get the text from my 2 visible text boxes, into the 1 and 2 column. the 0 column is done and finsihed. but how do i move to the next one for more text, from a different box.
I tested it keeping Unload form2 and it was working even transfering the combos.
What I saw in your code is that if you select existing values on the combos the button is not activated, you need to type something to actibvate the button. I solved it transfering the code from the change event to the click event.