Prev: Hi Larry, Hi Jeff,
Next: Passing a parameter
From: David on 21 Mar 2010 21:22 I have a MSFlexgrid. On top of the grid I have several comboboxes. I also use a textbox to edit certain cells. After the texbox is complete, if another grid cell is selected the previous textbox.text is transfered to the grid. Works great. ----------------------- HOWEVER, if I click a combobox instead of a grid cell the previous textbox value is not transfered to the gird. I placed the following code in the Combo_Click event. If Not txtDataEntry.Visible Then Exit Sub 'CRITICAL for moving text from last entered textbox to GRID >>(test1) MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, MSFlexGrid1.Col) = >>txtDataEntry.Text >>(test2) MSFlexGrid1.TextMatrix(miOldRow, miOldCol) = txtDataEntry.Text txtDataEntry.Visible = False ------------------------- Any ideas how to get the last entered textbox.text to be transferred to the grid when a combobox is selected??
From: David on 21 Mar 2010 21:27 Sorry for post -- may help someone else. Solution -- Use combo GotFocus event. Resolved "David" <NoWhere(a)earthlink.net> wrote in message news:eMJOr4VyKHA.5036(a)TK2MSFTNGP02.phx.gbl... >I have a MSFlexgrid. > > On top of the grid I have several comboboxes. > I also use a textbox to edit certain cells. > > After the texbox is complete, if another grid cell is selected > the previous textbox.text is transfered to the grid. > Works great. > > ----------------------- > > HOWEVER, if I click a combobox instead of a grid cell the > previous textbox value is not transfered to the gird. > > I placed the following code in the Combo_Click event. > > If Not txtDataEntry.Visible Then Exit Sub > > 'CRITICAL for moving text from last entered textbox to GRID >>>(test1) MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, MSFlexGrid1.Col) = >>>txtDataEntry.Text >>>(test2) MSFlexGrid1.TextMatrix(miOldRow, miOldCol) = txtDataEntry.Text > > txtDataEntry.Visible = False > > ------------------------- > > Any ideas how to get the last entered textbox.text to be transferred > to the grid when a combobox is selected?? > >
|
Pages: 1 Prev: Hi Larry, Hi Jeff, Next: Passing a parameter |