Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Moving From Flexgrid To Textbox


I have a situation where I've got one flexgrid control (call it flexSearch), and two data controls (call them dbFull and dbSearch). flexSearch is populated by dbSearch, and is filled according to a query. dbFull is the entire database, and is linked to a bunch of text fields (CompanyName, ContactName, etc).

Here's what I'd like to do: The user clicks on a record in flexSearch, and dbFull jumps to the corresponding ID and populates the bound text fields accordingly. The only way I can think of to do it is to page through the entire database until I come up with an ID that matches the one that was clicked in the flexgrid; however, I'm dealing with around 130,000 records, so I would rather avoid that processor overhead every time somebody clicks a field.

Any help would be greatly appreciated, thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving A Textbox In A Flexgrid With The Mouse ...
OK now I have worked out how to move my textbox around my flexgrid with the cursor keys, I want to take it one step further and allow the user to click a cell, which will in turn move the textbox to that cell.

I'm using the flxgrids MouseMove event, and obviously know the .Left and .Top of the grid itself, but is there any way of knowing what the row and column is where the user has clicked ?

E.g. if they click the cell in Row 3 Col 2, can I find out that it IS Row 3 and Col 2 ?

Thanks in advance ......

Superimposing Textbox And Listbox In A Flexgrid To Enter Values In Flexgrid
Hi,
    I had done a project(VB6) where I placed a textbox in flexgrid to enter data in flexgrid.After that I tried using textbox and listbox to enter data.When i press a key(FlexGridKeyPress Event) the textbox is made visisble in the current cell of flexgrid.the listbox is filled with values, so that when i enter data in textbox,listbox will be made visisble just below textbox appearing as if it is a combobox and depending on the values i enter in textbox the listbox scrolls up (if there is matching text entered in textbox) and by using arrow keys(keyboard) (event :- txtKeyDown event, kCode:-keycode=35)
i should be able select a value from listbox and the selected value(if selected) should be
displayed in the textbox.After that on enter key press (Keyascii=13) the textbox and
listbox should be made invisible(visible=false) and either the selected value from listbox or any text I enter in textbox should be displayed in the current cell of FlexGrid and after that focus should goto next cell same row in the flexgrid.I was able to bring the text box and listbox in the proper places but could not do the rest.Please can u give me
the solution with source code




Edited by - sanththomas on 7/7/2002 6:49:21 PM

Moving In Flexgrid
i have a flexgrid in my project. The database is over 350 records. My problem is that when something is changed by the user the row highlighted is far into the program and when the change is made the row selected goes all the way to the first entry. How do i get the grid to go back to the one it was at because i have to refresh the dao to show the change

Moving In A Flexgrid
I have a msflexgrid and a textbox to "Edit and Update" the cell.
I need to use the Up/Down, Left/Right Keyboard Arrows.
I suppose that using the keypress event in the grid will be ok, but i can not fiend the Code.

Can anybody help?

Moving Text From One Flexgrid To Another
What I want to do is, move text from one flexgrid to another, and then open another file that loads different text to the first flexgrid and then add that text to the bottom of the second flexgrid. The problem is, the first text adds to the second flexgrid ok but the second batch of text doesn't get added at all. Here is my code, does anyone see what I have wrong?

Code:
If Form4.PrintGrid.TextMatrix(2, 0) = "" Then
For i = 0 To 13
For j = 0 To 4
Form4.PrintGrid.TextMatrix(i, j) = HBP1Grid.TextMatrix(i, j)
Next j
Next i
ElseIf Form4.PrintGrid.TextMatrix(2, 0) > "" Then
For i = 14 To 27
For j = 0 To 4
For k = 0 To 13
Form4.PrintGrid.TextMatrix(i, j) = HBP1Grid.TextMatrix(k, j)
Next k
Next j
Next i
End If
Form4.Show

In Vb.net From 1 Textbox To Another Textbox Moving By Pressing Enter
as in vb6.0 we r write code in textbox keypress event as follow to move from textbox1 to textbox2.

if keyascii = 13 then
    textbox2.setfocus
endif

so above same task i want to do in VB.net
Please help me to solve it

Thank you

Moving To Exact Cell In Flexgrid
I am using a MSFlexgrid that I am having a text box float around so the grid can be editable. I was wondering if there was any way to go to an exact row,column combination. What I want to see is if there is any way to get around first doing flexgrid1.row = 2 then doing flexgrid1.column = 5. Is there any way to say go to 2,5 without moving to the row then to the column?

Thanks in advance.

Moving Through Records With DBGrid Or FlexGrid
I have a form that I want to setup like a Master/Detail form in which the Master Data is displayed in a grid at the top of the page and the details of the record displayed in Textboxes at the bottom of the page. This I can do easily and I can move through the records using movefirst, movenext, movelast, moveprevious..

I am using DAO 3.6 and no data control.

What I need to do is be able to click on a record in the grid and have the related record displayed in the textboxes at the bottom of the form. I also need the selected record hilited in the grid if the user uses the movebuttons on the form to navigate the data.

Both of these things are done automatically if both the grid and the textboxes are bound to a datacontrol but I'm not using one.

Does anyone know how this can be done?

Thanks, Rev. Michael L. Burns

Moving The Recordset To A Flexgrid Selection.
I am using the data control to display the fields of an employee database on a msflexgrid. This works fine, however I want the records I select to display in text boxes. For example the name fields are lname (last name), fname (first name), and mname (middle name). When the form runs all of the fields, and entries come up on the msflexgrid but I can't figure out how to make the texboxes update when I click on one of the names on the flexgrid. I would like to click on the last name on the flexgrid and have text1, text2, and text3 show the first, middle, and last name of the record I clicked on. I can get the specific cell I click on to display in a text box but I can't get each field of the selection to come up in other texboxes.
Example:
text1.text = msflexgrid1.text

I have searched for code examples for this and have been unsuccessful so far. Any help would be greatly appreciated.

Moving From One Textbox To Another ?
is there a way of moving from one textbox to another when the first one reaches it's limit on the amount of characters?

Moving From One Textbox To Another
i have 4 textboxes that can hold a maximum of 5 chars each.

what i want is that when the user enters the first 5 characters, the pointer skips to the next textbox. i need this for prompting for a serial number.

Moving Focus To Textbox
I have an ADD button on a form , When I click the add button I want to cursor to move to my first textbox, to start entering information.

Moving A Textbox At Runtime
Hi everybody,

Anyone knows how to move a textbox at runtime? I try to do thing like I can drag the textbox around the form at runtime, and then when I release the mouse button, the textbox stays there at the point I released the mouse button. Thanks for your help or any suggestion.

Picture && Textbox Moving
Hello All Memebers
How can i move a picturebox or textbox on a form in the running time.
thanks alot for advice


Egyptian Man

Moving Cursor In A TextBox
Hi everybody!
I'm trying to write an "On screen keyboard" for an application I have to delelop.
Using buttons I can easly modify the text property of a TextBox control (Text1) writing whatever I want.
I can also start a new line with the code line "Text1.text = Text1.text & vbCrLf" but I cannot move the cursor one char left or right through the string using the Chr(26) or Chr(27)!
If I try "Text1.text = Text1.text & Chr(26)" a non printable char is displayed and the cursor shifts always right .
I would like simply to simulate the arrow keys...
Can anybody help me?
Thanks
maru

 

Moving The Scrollbar In A Textbox
is there any way to move the scrollbar in a textbox with a command?

Prevent Cursor In Textbox From Moving
like in the thread title,
is there anyways to prevent the cursor from shifting or moving within a textbox??

for example, i press right or left arrow buttons for some reasons, but i do not want to move the cursor in the textbox that is used for input....maybe it is preferable to maintain the cursor at the end of the string that the user typed or backspace.

Moving Things From A Listview To A Textbox?
Hey guys I have a listview called report and it has check boxes. I have another form called form2 with a text2.text.

Is there a way when I check one item and press a button that checked item goes in the text2 of the form2?

Its just the item from the first column of the report listivew.

Thanks!

Moving Cursor To Next Textbox Automatically
I have 8 small textboxes with a maxlength of 1, and I want to make it so when somebody types a character in one of the boxes it automatically moves the cursor to the next box without the user having to press tab or manually click the next box.
Is there an easy way to do this?

Moving The Textbox Cursor To The End Of All Text
hello,
i'm making am update client for an online journal website. the website supports bbcode, so in the app i've made buttons like Bold, Italic, Underline, etc...so when you click the button it prints either an opening tag or a closing tag . but when you click the button it and set the focus on the textbox again the cursor in the textbox moves to the beginning.


Code:


Tag$ = "[b]"
txtBody.Text = txtBody.Text + Tag$
txtBody.SetFocus



i know there is a way to keep the cursor at the end of the textbox i just don't know how. could anyone help me out?
thanks
-Dustin

Moving Text From Textbox To Listbox
I'm trying to move text from a multiline textbox [Text1] to a list box [List1] but I cant seem to get it :-( Here's what I've done so far.... The code skips some lines. Any help will be appreciated. TIA


Dim CurrStart As Integer
Dim Temp As String 'temp buffer
CurrStart = 1
Temp = Text1 'save text1 to temp
While InStr(CurrStart, Temp, vbCr)
    CurrStart = InStr(CurrStart, Temp, vbCr) 'find the newline
    List1.AddItem Left(Temp, CurrStart) 'add this line to listbox
    Temp = Right(Temp, Len(Temp) - CurrStart) 'remove this line from temp
Wend

How To Highlight A Text In A Textbox When Moving Focus On It
I have several textboxes and bound each of it with datafields from a database. I already coded all the command buttons for database operation like deleting, adding, editing and database navigation buttons. The problem is that during the editing mode I want the text in a textbox is highlighted each time I click tab to move focus on it.

How To Show Data In A Textbox When Moving Through The MSHFlexgrid Rows?
Dear Friends,

I am using MS Accsess database with VB6. It is bound to database through recordset.

The following code is fine.

Code:
Dim Z As Long
With MSHFlexGrid1
For Z = .FixedRows To .Rows - 1
txtDescription.Text = .TextMatrix(Z, 3)
Next Z
End With

But when I move through the records in MSHFlexgrid (by clicking on each row) the txtDescription.Text doesn't change.

How to make it work? Please help.

Moving To The Next Line In A Textbox (WITHOUT) Pressing Enter (return)???
Hi,

I would like to press a button that will make txtInput go to the next line, How would I do this???

Textbox Won't Go Over A Flexgrid
I have this program where I create a textbox over a MSFlexGrid to edit fields. That was working fine. Then I made a number of seemingly unrelated changes to other parts of the program,, and now the textbox won't display over the grid. If I make the grid not visible (grid.visible=false), then I can see my text box.
I compared the settings between the old version (that works in this respect) and the new one, and the code that relates to the grid and the textbox have not changed!!!
I have set the focus to the textbox, made it visible and active, and it does nothing.
Any help appreciated
Didier KO4BB

Textbox/Flexgrid
I'm trying to position a textbox over a flexgrid cell for editing. Here's the code I'm using for the positioning:
************************
txtCell.Width = MSHFlexGrid1.CellWidth
txtCell.Height = MSHFlexGrid1.CellHeight
txtCell.Left = MSHFlexGrid1.Left + MSHFlexGrid1.CellLeft
txtCell.Top = MSHFlexGrid1.Top + MSHFlexGrid1.CellTop
************************
ScaleMode is set to Inches. When it runs, nothing adds up. for example, txtCell.Width is 170.6563, MSHFlexGrid1.CellWidth, is 945; in fact, ALL txtCell.... values are 170.6563. If I hard code a value instead if the grid dimension, it sees that. Any ideas???

FlexGrid With TextBox
Hi

I want to check if there is no data in the Flexgrid then textBox = ""

Textbox Not Visible On FlexGrid
Hello,

I've managed to add code to my form which enables me to use a textbox to update any cell within my flexgrid. The problem I'm having is, I cannot see the textbox at data entry time. Only when I've pressed return can I see the data (after the flexgrid has been updated). I've tried bringing the textbox to the front but no joy.

There is the odd post on the net which says the use of a picture box overcomes this but I'm not sure how to apply this theory (assuming this is the best solution)?

Cheers,

Al.

Copy From Flexgrid Into Textbox
Hi everyone, having a few problems. I need to copy a row of data from a flexgrid into a series of text boxes. I have the grid populated from an oracle table and all textboxes created ( 5 in total) but don't know how to populate these when a row is selected in the grid.

Any help would be much appreciated.

Edit The Flexgrid By Using Textbox
hi,

I am able to display the data by using msflexgrid, by now i would like to
edit and delete the data with in MSFlexGrid by using textbox. exactly where the data is displayed in msflexgrid.

so please give me some tips , how to do it

suresh

Export FlexGrid's To TextBox
Hi

I have 2 flexgrid and i want to export mix data from both grid to textbox

I want to export flexgrid to text by Row so textbox will be like that

Row1
vbCrlf
Row2
vbCrlf
Row3
vbCrlf
Row4
vbCrlf ' To the end

I'm using this code it give me only the first Row


VB Code:
Private Sub Command1_Click() Dim IRow As Integer IRow = FG1.Row If FG2.TextMatrix(IRow, 15) = "JAMAL" And FG2.TextMatrix(IRow, 16) = "YES" Then Text1.text = "GGG" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _FG1.TextMatrix(IRow, 3) & vbCrlf & FG2.TextMatrix(IRow, 4) & "//" ElseIf If FG1.TextMatrix(IRow, 15) = "MIKE" And FG1.TextMatrix(IRow, 16) = "NO" Then Text1.text = "JJJ" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _FG1.TextMatrix(IRow, 3) & vbCrlf & FG2.TextMatrix(IRow, 4) & "//" End If End Sub


If i fill only three Rows then the textbox should be like that

Row1
vbCrlf
Row2
vbCrlf
Row3

Not all the Row's

FlexGrid To TextBox With VbCrLf
Hi

I have 2 FlexGrid and i want to export some data from both FlexGrid's to TextBox Row ByRow saprated by VbCrlf

This code want work correctly it give me one row or 2 row's and no more


Code:
Private Sub Command1_Click()
Dim G As Integer
Dim N As Integer

Text1.Text = ""

For G = 1 To FG1.Rows - 1
For N = 1 To FG2.Rows - 1

Text1.SelStart = Len(Text1.Text)

If FG2.TextMatrix(N, 16) = "Cold" And FG2.TextMatrix(N, 15) = "YES" Then
Text1.SelText = "TASK" & "/" & FG2.TextMatrix(G, 1) & "Hi" & "/" & FG2.TextMatrix(G, 2) _
& vbCrLf & "OK" & "/" & FG1.TextMatrix(G, 3) & vbCrLf

ElseIf FG2.TextMatrix(N, 16) = "Hot" And FG2.TextMatrix(N, 15) = "NO" Then
Text1.SelText = "TASKED" & "/" & FG2.TextMatrix(G, 1) & "Not Bad" & "/" & FG2.TextMatrix(G, 2) _
& vbCrLf & "OK" & "/" & FG1.TextMatrix(G, 3) & vbCrLf

ElseIf FG2.TextMatrix(N, 16) = "Cold1" And FG2.TextMatrix(N, 15) = "YES" Then
Text1.SelText = "TASK" & "/" & FG2.TextMatrix(G, 1) & "Sorry" & "/" & FG2.TextMatrix(G, 2) _
& vbCrLf & "OK" & "/" & FG1.TextMatrix(G, 3) & vbCrLf

ElseIf FG2.TextMatrix(N, 16) = "Hot1" And FG2.TextMatrix(N, 15) = "NO" Then
Text1.SelText = "TASKED" & "/" & FG2.TextMatrix(G, 1) & "Bad" & "/" & FG2.TextMatrix(G, 2) _
& vbCrLf & "OK" & "/" & FG1.TextMatrix(G, 3) & vbCrLf

ElseIf FG2.TextMatrix(N, 16) <> "" Or FG2.TextMatrix(N, 15) <> "" Then
Text1.Text = ""
End If

Next

Next

End Sub


Thank's

Export FlexGrid To TextBox
Hi

I want to export flexgrid to text by Row so textbox will be like that

Row1
vbCrlf
Row2
vbCrlf
Row3
vbCrlf
---------> To the end of Rows

I'm using this code it give me only the first Row


VB Code:
Private Sub Command1_Click() Dim IRow As Integer IRow = FG1.Row If FG1.TextMatrix(IRow, 15) = "JAMAL" And FG1.TextMatrix(IRow, 16) = "YES" Then Text1.text = "GGG" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _FG1.TextMatrix(IRow, 3) & vbCrlf & FG1.TextMatrix(IRow, 4) & "//" ElseIf If FG1.TextMatrix(IRow, 15) = "MIKE" And FG1.TextMatrix(IRow, 16) = "NO" Then Text1.text = "JJJ" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _FG1.TextMatrix(IRow, 3) & vbCrlf & FG1.TextMatrix(IRow, 4) & "//" End If End Sub

Using Tab To Move Textbox Through A FlexGrid
Hi,

im using a textbox to edit data in FlexGrid. When the user click on the cell, the textbox is showed and when the user click enter, the textbox is hide and the cell show what was written.

My problem is that each time that user edit a cell, he needs click with mouse on the cell. How there,'re many cells, this process is very slow.

How can I allow the user press the key TAB to hide the textbox and show the textbox in another cell?

thanks
Daniel

Textbox Array To Flexgrid
i have a textbox array text1(0) thru text1(25) Hot can i get these
Values to Go into a Flexgrid Form >?

thanks

Export FlexGrid Rows To TextBox
Hi

I want to export flexgrid to text by Row so textbox will be like that

Row1
vbCrlf
Row2
vbCrlf
Row3
vbCrlf
---------> To the end of Rows

I'm using this code it give me only the first Row



Code:
Private Sub Command1_Click()

Dim IRow As Integer

IRow = FG1.Row

If FG1.TextMatrix(IRow, 15) = "JAMAL" And FG1.TextMatrix(IRow, 16) = "YES" Then

Text1.text = "GGG" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _
FG1.TextMatrix(IRow, 3) & vbCrlf & FG1.TextMatrix(IRow, 4) & "//"

ElseIf If FG1.TextMatrix(IRow, 15) = "MIKE" And FG1.TextMatrix(IRow, 16) = "NO" Then

Text1.text = "JJJ" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _
FG1.TextMatrix(IRow, 3) & vbCrlf & FG1.TextMatrix(IRow, 4) & "//"

End If

End Sub

Passing Values From Flexgrid To Textbox
I have code to add total of a column in a flexgrid. The amount in the flexgrid are formated to "#,###,###.00" the reason is i am working with high numbers in millions so i need for it to be like that when the total is displayed in a textbox. How can i keep the format from flexgrid to textbox and also be able to transfer decimals etc keep the original number that is inserted into the flexgrid.???

Populate Textbox Based On Flexgrid Value
I have a flexgrid with 2 columns, 0 and 1. I need to populate a textbox with the value of column 1. I have values for column 0 listed in a listbox. What I would like to do is step through each value in my listbox and populate the textbox with the corresponding value. Here is what I have so far:


Code:
dim i as long
for i = 0 to frmTest.lstFields.ListCount -1
dim sTest as string
txtTemp.Text = frmTest.Flexgrid1.TextMatrix(lRow, 1) 'I am not setting lRow
'This is what I need
'to change
sTest = txtTemp.Text
msgbox sTest
next i

Thanks for any help!

Export FlexGrid Rows To TextBox
Hi

I want to export flexgrid to text by Row so textbox will be like that

Row1
vbCrlf
Row2
vbCrlf
Row3
vbCrlf
Row4
vbCrlf ' To the end

I'm using this code it give me only the first Row


VB Code:
Private Sub Command1_Click() Dim IRow As Integer IRow = FG1.Row If FG1.TextMatrix(IRow, 15) = "JAMAL" And FG1.TextMatrix(IRow, 16) = "YES" Then Text1.text = "GGG" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _FG1.TextMatrix(IRow, 3) & vbCrlf & FG1.TextMatrix(IRow, 4) & "//" ElseIf If FG1.TextMatrix(IRow, 15) = "MIKE" And FG1.TextMatrix(IRow, 16) = "NO" Then Text1.text = "JJJ" & "/" & vbCrlf & FG1.TextMatrix(IRow, 1) & FG1.TextMatrix(IRow, 2) & _FG1.TextMatrix(IRow, 3) & vbCrlf & FG1.TextMatrix(IRow, 4) & "//" End If End Sub


If i fill only three Rows then the textbox should be like that

Row1
vbCrlf
Row2
vbCrlf
Row3

Not all the Row's

Textbox Info To Flexgrid And Back??
I have a program that allows users to input information about software modules they are releasing to different systems, environments, etc. This information is posted to a database for reporting purposes. How often was user X late with his programs, How many emergency fixes did we have, etc.

I would like to provide a way for the users to view everything they have submitted before posting the information to the database, in case they made a mistake (Even though programmers never make mistakes

I was thinking about posting the information to a flexgrid and allowing the user to view/edit the information before it is sent. Does anyone know if this is feasible? The best way? How to do it :-?

Thanks for the help,
Doug

Database...flexgrid Or Textbox Array???
I've got a database that has one table for students and each class the students take. There are 44 classes that the students take, each having a grade, status, and comments. I use an mshflexgrid to edit just the grades, status and comments. The course names and numbers are static so they're hard coded.

If I use an array of textboxes (to simulate a grid) with their datafields set, the database can contain lots of grades, status, and comments entries. But if I use the flexgrid, then read the entries into an array or collection, I get "error: record too large" on the update process. The textbox array is too slow and the flexgrid causes the error...?

The project uses DAO and it's not a school project, just one I wrote for one of my instructors so he could keep track of his students rather than keeping track of them on paper. He has the textbox array working copy but I wanted to give him the ability to use the grid.

Does anyone know a way to stop this from happening??

VBsixer

Displaying FlexGrid To Textbox Array
Hi, everyone

I have problem with displaying from Flexgrid to textbox. Flexgrid data source was connected to Ms Access with sql command.

Private Sub DBCombo1_Change()
Dim sql
sql = "select * from Tabel where Name=" & "'" & DBCombo1.Text & "' "
Data2.RecordSource = sql
Data2.Refresh

Text1(0) = MSFlexGrid1.TextMatrix(1, 2)
Text1(1) = MSFlexGrid1.TextMatrix(2, 2)
Text1(2) = MSFlexGrid1.TextMatrix(3, 2)
End Sub

The problem is when the data in FlexGrid Column contains 2 rows, the error said Subscript out of range.

It is possible to make if the data only 2 rows, the textbox that will be displayed text(0) and text(1).


Thanks and have nice day

/sukarso

How Do I OLE Drag Drop From A Flexgrid To A Textbox
Hi

As per subject line, how can I implement an OLE drag drop from an msflexgrid to a textbox. I'm clueless!

Cheers

Form2 TextBox To Form1 FlexGrid Text
Hi

I have a flexgrid on form1 with 5 Row's when i click first Row form2 will show with textbox on it

If i type anything on the textbox is it possile to show this data on first Row cell 4

And if i click 2nd Row and form2 open and i change the data on the textbox
is it possile to show this data on the 2nd Row cell 4 with no change on first Row data and same for the other Row's

Pass Data From FlexGrid To Textbox Or Label
How do I pass the selected row of data from MS Flexgrid to a textbox or lable on another form?
Without using the ado bound control.

How To Insert The Text From The Textbox To Datagrid/flexgrid?
Helllo~!

I am using visual basic 6.

I need to get text from textboxes and make those text appear in cells of the datagrid/flexgrid?

Anyone has suggestions on how should i do it. Thanks.

Using Textbox+listbox To Enter Data In Flexgrid
MSFG->MSFLEXGrid
txtEdit ->textbox
List1->ListBox


Private Sub Form_Load()
Dim intLoopIndex As Integer
    'For Row Number 1,2,3 etc
    For intLoopIndex = MSFG.FixedRows To MSFG.Rows - 1
        MSFG.TextArray(MSFG.Cols * intLoopIndex) = intLoopIndex
    Next
    'For Col Purpose ie A,B,C
    For intLoopIndex = MSFG.FixedCols To MSFG.Cols - 1
        MSFG.TextArray(intLoopIndex) = Chr(Asc("A") + intLoopIndex - 1)
    Next
    'Setting Col Width
    For i = 1 To MSFG.Cols - 1
        MSFG.ColWidth(i) = 2000
    Next
    'Filling listbox with values
    FillControl List1, "ItemMaster", "ItName"
End Sub

Private Sub MSFG_KeyPress(KeyAscii As Integer)
    txtEdit.Height = MSFG.CellHeight
    If KeyAscii <> 8 Then
        txtEdit.Text = Chr(KeyAscii) 'To display the first Value in TextBox
        txtEdit.SelStart = 1
    ElseIf KeyAscii = 8 Then
        If MSFG.TextMatrix(MSFG.Row, MSFG.Row) <> "" Then txtEdit.Text = MSFG.TextMatrix(MSFG.Row, MSFG.Row): txtEdit.SelStart = Len(txtEdit) + 1
    End If
    'Moving the textbox and ListBox to proper places
    txtEdit.Move MSFG.CellLeft + MSFG.Left, MSFG.CellTop + MSFG.Top, MSFG.CellWidth ', MSFG.CellHeight
    List1.Move MSFG.CellLeft + MSFG.Left, MSFG.CellTop + MSFG.Top + MSFG.CellHeight, MSFG.CellWidth
    txtEdit.Visible = True
    List1.Visible = True
    txtEdit.SetFocus
End Sub

Private Sub MSFG_LeaveCell()
    If txtEdit.Visible = False Then
        Exit Sub
    End If
    MSFG.Text = txtEdit.Text 'On Losing Focus contents in text placed in Grid
    txtEdit.Visible = False
    txtEdit.Text = ""
    List1.Visible = False
    MSFG.SetFocus
End Sub

This is what I did.I filled ListBox with Values.In Grid keypress i am able to bring textbox and listbox in proper places.In grid leavecell i am able to bring the value in textbox to Grid.What i dont know is how to relate textbox and list box events/methods,so that when i press a key in textbox the listbox should scroll up depending on value(Asc(Key) i have pressed in textbox.for eg if ListBox contains foll values
CD Drive
Creative Kit
Logitech Mouse
LG Monitor
Pentium 3 500 Mhz
Pentium 3 600 Mhz
Pentium 3 700 Mhz
Scanner
Samsung color monitor
         when I press P listbox should scroll up with Pentium 3's in that order on top position of listbox.This is some thing i am not able to do.As ChiefRB said i tried but could not find a solution.Can u give me the solution with codes.

Code For Moving To The First Blank Cell In A Worksheet; Moving Left,right,up Or Down
I have created an application form as a userform in Excel. I need to send the data entered into my text boxes when the program runs to separate excel cells in a worksheet.

My problem is I can use code that will send the textbox entry to a specific cell eg. If my textbox is named Surname I can say

range("a5").value = surname but if I do that when I run the programme to enter the next record for someone else the first record will be overwritten.

I NEED A CODE LINE THAT WILL TAKE ME TO THE FIRST EMPTY CELL AND ALLOW ME TO MOVE DOWN OR TO THE LEFT OR TO THE RIGHT

Flexgrid Data - Move Row Automatically As Data Type In Textbox
Dear All,

I have hundered of records in Flexgrid & find a particular record is dififcult & if i want to fiind out particulart record from second column so what i want that in one text box as i type the row which have that data move top or move up.

Pls. help me.

Regards
Bright18

Copyright © 2005-08 www.BigResource.com, All rights reserved