Ernesto_Paez
MIS
Hi guys,
i already have a txtbox where i type a value an after i press enter, then the keypress event insert each individual value from the txtbox it into a cursor and once is inserted into that cursor, this cursor is the recordsource for grid1, that will show all the values that has been added one by one from the txtbox.
so now actually what i would like to do is, using an Edit box, instead of a txtbox so then i can get from and existing excel file from a column the values from the cells i want and copy those cells values and paste those values to the Edit box, then once in the edit box, press the Enter key and insert then into the cursor "JOBNOS", this cursor is the recordsource for grid1, that should display all the values pasted into the Edit box, i can paste from excel to the Edit box but the keypress event it is not doing it for me, only gets one of the value from the edit box.
here is my code in the Keypress of the Edit1 box
i will get from the excel the job_no values from each cell, then paste them in Edit1 box but this code it is not doing it for me, if worked when i have in instead of the edit box a txtbox.
how can i find the way to insert all the values from the edit box to the cursor "jobnos" after i pressed the Enter key ?
Thanks in advance a lot
i already have a txtbox where i type a value an after i press enter, then the keypress event insert each individual value from the txtbox it into a cursor and once is inserted into that cursor, this cursor is the recordsource for grid1, that will show all the values that has been added one by one from the txtbox.
so now actually what i would like to do is, using an Edit box, instead of a txtbox so then i can get from and existing excel file from a column the values from the cells i want and copy those cells values and paste those values to the Edit box, then once in the edit box, press the Enter key and insert then into the cursor "JOBNOS", this cursor is the recordsource for grid1, that should display all the values pasted into the Edit box, i can paste from excel to the Edit box but the keypress event it is not doing it for me, only gets one of the value from the edit box.
here is my code in the Keypress of the Edit1 box
Code:
If nKeyCode = 13
Insert Into jobnos (job_no)Values (Thisform.Edit1.Value)
thisform.grid1.Refresh
this.Value = ''
Thisform.cmdQuery.Enabled=.T.
Thisform.cmdReset.Enabled=.T.
Endif
how can i find the way to insert all the values from the edit box to the cursor "jobnos" after i pressed the Enter key ?
Thanks in advance a lot