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




Extracting Datagrid Textbox Value To A Textbox Outside Datagrid


Hello to everybody! I hope you all will be able to help me with this problem!

I have a textbox named 'Textbox2' which is inside a Datagrid. And I have a Label named 'Label1' which is declared outside the datagrid.

I tried to retrieve the 'Textbox2' value from datagrid to the 'Label1' value which is outside the datagrid.
I tried typing the below code...

Label1.text=Textbox2.text

But I get a error message, which is "Name 'Textbox2' is not declared."

Can u guys please help me on how can i retrieve a textbox value from a datagrid and assign it to another textbox value which is outside the datagrid.



Thank you very much!!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Datagrid To Textbox
Hye all,

The question is how can i export and view a data that have been selected in Datagrid in Textbox. I want to call for example, column 1 into text1 and column 2 to text 2. I need the easiest approach that anyone can give.

And by the way, I have read something about CurrentRowIndex but I did not get the clear picture about it. How can it be useful in my situation and how can i use it? Any declaration needed?

Thanks.

VB 6 : Datagrid And TextBox
Dear All,

I want to do the following :

when i click on the cell of the datagrid, the value of the cell will transfer to the textbox, so each time i select different cell, the textbox value will change based on the datagrid cell that i choose.

anyone know how is it done??

Please Help Me


NB : I populate the datagrid's data from database through the textbox change event

Thanks

How To Get Value From Datagrid Into Textbox
my database have 4 column (colA, colB, colC, colD)

i have 4 textbox and data grid

can i do this ?

if i click on row in data grid, how to change data in 4 textbox to show data which row that i select on datagrid

* my datasource of datagrid is dataview, table of dataview is dataset.Test
* 4 textbox binding text with dataset - Test.colA

forgive with my english, i'm newbie of it

thanks!
eak

Add New Row To Datagrid From Textbox
Hi, I'm trying to add new rows to a datagrid from values of textboxes, it works fine but when the rows of the grid are bigger than the visible size of it, it gives an error of "incorrect number of line", i think it has to do something with the bookmark but i'm not very sure, can someone help plz?


VB Code:
' Set new recordset to add the new rowSet rsArray = New ADODB.Recordset            With rsArray                               .Fields.Append "ID_MONTO_ADICIONAL", adInteger               .Fields.Append "CONCEPTO_MONTO", adVarChar, 50               .Fields.Append "MONTO_ADICIONAL", adDouble               .CursorType = adOpenStatic               .LockType = adLockOptimistic               .Open                '--load all the records that were before               Dim i As Integer               For i = 0 To can_filas - 1 ' can_filas has already the number of rows before adding a new one                   Me.dgMontosAdic.RowBookmark (i) [b]'--Get a row of the grid, gives error here when i insert record 11, and the visible size of the grid is 10[/b] ' Add all rows that were before                   .AddNew                   ![ID_MONTO_ADICIONAL] = i + 1                   ![CONCEPTO_MONTO] = Me.dgMontosAdic.Columns(1).Text                   ![MONTO_ADICIONAL] = Me.dgMontosAdic.Columns(2).Text               Next                              '--Add the new record               .AddNew               ![ID_MONTO_ADICIONAL] = i + 1               ![CONCEPTO_MONTO] = txtConcepto.Text               ![MONTO_ADICIONAL] = txtMonto.Text                              .Update' update the number of rows               can_filas = can_filas + 1            End With            ' update the grid with the new recordset and the new row.            Set Me.dgMontosAdic.DataSource = rsArray


i hope u understand me, and thanks in advance for help

Datagrid To Textbox
datagrid to textbox ...?

Datagrid Row Change And Textbox
Hi all,

I have a datagrid and I am populating some textboxes. But when I move to another record in the datagrid the value only updates instantly if you click on the small grey box on the left of the grid. If I click on the anywhere else on the grid the position moves (ie. the arrow in the grey box moves to the row selected) but the textbox doesnt update. The textbox only updates if I click on the same row again (its one step behind!). Is there any way to get the textbox to update instantly by clicking anywhere on the grid?

I am populating the textbox using:


Code:
txtGrade.Text = RecSet.Fields("Grade")

Thanks in advance

Move Value From Datagrid To Textbox
I have a datagrid that loads from a database. The form with the datagrid has several textboxes which load when the user clicks on one of the rows. My problem is one of the fields ("Priority Notes") that loads to the textboxes may or may not have data. If it has data, the data shows up in the textbox fine but if there is no data, I get a "type mismatch" error. I have tried a number of ways to check to see if there is nothing in the cell but haven't found the right code yet.
Private Sub grdDataGrid_Click()
grdDataGrid.Col = 0
grdDataGrid.RecordSelectors = True
With Me
.intKey = .grdDataGrid.Columns(0).Value
'Hardware
.txtBox(0).Text = grdDataGrid.Columns(1).Value
'Serial Number
.txtBox(1).Text = grdDataGrid.Columns(2).Value
'Status
.txtBox(2).Text = grdDataGrid.Columns(3).Value
'Priority Notes
If grdDataGrid.Columns(4).Value <> "" Then
.txtBox(3).Text = grdDataGrid.Columns(4).Value
End If
intKey = grdDataGrid.Columns(0).Value
.txtKey.Text = intKey
intShip = CInt(grdDataGrid.Columns(8).Value)
.txtShip.Text = intShip
.Refresh
End With
Any help would be appreciated.

Datagrid Values To Textbox
Hi all,

I am very new to VB. I am using VS2005 vb. I have two textboxes and one grid with two columns

I want to populate the grid values to text box while clicking the exact row?

Is it possible?


can any one give me the solution..?

Thanks
Krishna

Datagrid And Databinding To Textbox
Dear all,

I am getting stuck in the implementation of Data display/maintain in a windows form. The UI likes that: one datagrid, a couple of textboxs and comboxes, and couple of buttons of 'add', 'delete','update','confirm','cancel'. The datagrid only display few of the all the fields, but when click the row in grid, all the detailed values of this row should display in textboxes.

I bind the dataset.table to grid.datasouce for display data in the grid, my questions are:
1) Should I bind the data of ds.table(0).column to textbox or manually get the value from grid and display to the textbox?

2) There are two ways to retrieve data. one is sellect all the columns to fill the datagrid(but invisible some columns) or only select the columns that needs to be shown in the grid(when user navigator the row, get detailed row from database again)

I may post some issues about the 'add', 'delete' ... later on.

Thanks for help,

Robert

Displaying Datagrid Value In Textbox
i have a program that uses datagrid to display records. I want to be able to edit the records not directly on the grid so i have to display the record i want to edit in a textbox. I have three columns, and 8 rows showing on my grid. If i clicked on the second row of the datagrid for the first time the value is displayed on the textbox is the value of the first row of the datagrid and if I click on the second row of the datagrid, the value that will be displayed on the textbox is the value of the second row of the datagrid and so on. But if i double click any row that's the only time it will give the correct output.

What I want should be whatever is the value of the row i clicked the same will be displayed in the textbox. Any Idea please?

Here's my code:

VB Code:
Private Sub DataGridAuthor_Click()  If DataGridAuthor.DataSource Is Nothing Then Exit Sub      With DataGridAuthor    txtAuthorID.Text = .Columns(0).Value    txtAuthorFName.Text = .Columns(1).Value    txtAuthorLName.Text = .Columns(2).Value  End With

Filtering A Datagrid With A Textbox
i haf a datagrid bounded to a adodc control to view my table in the database

i'm trying to filter the view using a textbox
*e.g. typing 20/06 (the date) into the textbox and the datagrid will show all records that are of the same date

and also after filtering, i want to be able to edit a column using a combo box

i've done the project, it can view the table and edit the 'attendance status' column using the combox box, all i lack now is to filter the data shown.

can any1 help? thx alot in advance

i've attached the project

Datagrid Row Change And Textbox
Hi all,

I have a datagrid and I am populating some textboxes. But when I move to another record in the datagrid the value only updates instantly if you click on the small grey box on the left of the grid. If I click on the anywhere else on the grid the position moves (ie. the arrow in the grey box moves to the row selected) but the textbox doesnt update. The textbox only updates if I click on the same row again (its one step behind!). Is there any way to get the textbox to update instantly by clicking anywhere on the grid?

I am populating the textbox using:


VB Code:
txtGrade.Text = RecSet.Fields("Grade")


Thanks in advance

Datagrid With Acting Like Textbox
hello there!!! a friend asked me about a datagrid with you can input data to much like a textbox does!!! is there a control like that or do she have to put textboxes for each field??? any suggestion or help will be much appreciated!!!

Display Data From Datagrid To Textbox
i want to know on how can i simply display the data in datagrid in the textbox.for example the user will click on one item in the datagrid and then all the data from the row will be displayed in each of the textbox that i've assign for each of the fields in the recordset.help me..tq

Datagrid With Controls E G Textbox, Combo Box
Is there such a way that i could place a controls like Combo box, texbox inside a data grid control in VB 6.0 so that when i add a data onto the datagrid i will select a list in the control... or suggestion what control will i use? Thanks...

Filtering A Datagrid With A Textbox HELP URGENT
i haf a datagrid bounded to a adodc control to view my table in the database

i'm trying to filter the view using a textbox
*e.g. typing 20/06 (the date) into the textbox and the datagrid will show all records that are of the same date

and also after filtering, i want to be able to edit a column using a combo box

i've done the project, it can view the table and edit the 'attendance status' column using the combox box, all i lack now is to filter the data shown.

can any1 help? thx alot in advance



i've attached the project



Edited by - Asakura on 5/2/2005 5:07:04 AM

Scrolling Textbox Inside Datagrid
Hello All

I am using datagrid and textbox inside it (in a column) to show data.
I used


Code:

txt.left=datagrid.cellleft
txt.top=datagrid.celltop
txt.width=datagrid.cellwidth and so on



But the problem is When there is data more than one page and scrolling is required only the datagrid contents are scrolled but not the textbox.

How can i solve my problem at this moment?

Thank You

DataGrid Cell Forecolor And TextBox Min Size
Hello,
I have two questions that are driving me mad:
1) Do you know if is there a way to set in a DataGrid control the forecolor of the only current cell? (I saw that in the MSHFlexGrid it is possible to do it by means of CellForeColor property, but I can't use that control because I need to modify the access database)
2) Using a TextBox, I noticed that it isn't possible to reduce its height under a minimum size (280 twips approximately). Is there a way to reduce this minimum size?

Thank you wery much

Placing Selected Line From DataGrid Into Textbox
All,
I am trying to place selected text from a datagrid into multiple textboxes. I can get data from first row of the datagrid without any problems, but I want to get the row that is selected. Any help would be appreciated.

J.

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.

VB 6 Populate A Datagrid From Text Entered In A Textbox
VB 6 Populate a datagrid from text entered in a textbox ...?

Display Selected Row Details From Datagrid To A Textbox
Hi, can anyone help me with the above question?

How To Display The Data Inputted From A Textbox To The Datagrid?
I'm using vb6. and i'm just wondering how to make changes in a datagrid without binding it to a datasource.


(Moved from VB.NET Forum to VB General Forum - CanOz)



Edited by - pelipe_H on 1/22/2005 1:25:20 AM

Storing A DataGrid Record To A Textbox -SOLVED-
I want to allow the user to select a row from the datagrid and copy the individual fields of the selected record to individual textboxes for verification on the next screen.


Code:
Set conUDA = New ADODB.Connection
Set rsCust = New ADODB.Recordset
conUDA.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Persist Security Info=False;Data Source=" & App.Path & "UDA.mdb; mode = read"
        
conUDA.Open

strSQL = "select * from CUSTOMERS where FNAME Like '" & strFname & "' and LNAME Like '" & strLname & "' and COMPANY Like '" & strCname & "' and PHONE Like '" & strPhone & "'"

With rsCust
    .CursorLocation = adUseClient
    .Open strSQL, conUDA, adOpenDynamic, adLockOptimistic, adCmdText
End With


If rsCust.RecordCount = 0 Then
    MsgBox "No items found"
Else
    Set DataGrid1.DataSource = rsCust
    DataGrid1.Refresh
    
End If


After selecting the row and clicking next I want to transfer the selected fields to textboxes (as said above)...I am trying something like:

frmSession.txtFName.Text = DataGrid1.?????

Am I even close?






Edited by - melvijp on 12/7/2003 9:23:15 AM

Datagrid Click Not Passing The Selected Data To Textbox
it bothers me why after clicking the datagrid and a selected data was highlighten the recordset still passing the previous data.

I use to pass the data to a textbox after clicking one of the records shown in a datagrid. but it happends to have a late reaction. when i choose the 2nd record the 1st one will be displayed in the textbox. then try another record then it will just display the previous one which is the 2nd record and do another then same thing will happened.

i check using debug.print the recordset and same output will appear.

what's wrong with it? im using ado and i just use this to connect with the source "Set datagrid.source = rs"

and this is the code when i click datagrid to select a data...

VB Code:
Private Sub DataGrid1_Click() DataGrid1.SetFocusDataGrid1.MarqueeStyle = dbgHighlightRow Text1.Text = DataGrid1.Columns(0)Text2.Text = DataGrid1.Columns(1)DataGrid1.Refresh End Sub


so help somebody.... thanks in advance

Extracting Last Number From A Textbox
I am creating a text encryption program. It uses 5 different algorithms that are selected randomly. The algorithm # that is selected (1-5) is inserted as the last character in the output textbox after being encrypted. Now what I dont understand how to do is to extract that last letter so it can automatically choose how to decrypt it instead of me having to input the number manually. Thanks in advance.

Extracting Textbox Text
There is another process running on the computer that I did not write. In that processes window you see a text box with some text in it that changes.

I need to extract this text from that textbox. I have the hwnd of that element, so I just need to read that hwnds text, but GetWindowText did not work for me.

Any ideas on how to get the correct text out?

Thanks in advance!

Extracting Text From Word TextBox
Dear Helpers
i have been working on word Document files.
each document has same text format.
i m using the code below to extract text from it,



Code:

Dim sFileName As String 'Name of files within the folder will be stored
Dim i As Integer 'This will count the files read***
Dim wrd As Word.Application
Dim wrdCount As Long 'Number of characters within the file
'Get the first file with extension "DOC" ***
sFileName = Dir$("C:Virology*.DOC") '***
Do While sFileName <> "" '***
Set wrd = New Word.Application 'Create obj of word application
wrd.Visible = False
wrd.Documents.Open "C:Virology" & sFileName
wrdCount = wrd.Documents(1).Characters.Count
Text1.Text = Text1.Text & vbCrLf & i & wrd.Documents(1).Range(0, wrdCount).Text
wrd.Documents(1).Close
Set wrd = Nothing
sFileName = Dir$ '***
i = i + 1
Loop

This works good for all the characters in the document but the problem rises when word textbox appears in the document.

Extracting Text From Word Textbox
Dear Helpers
i have been working on word Document files.
each document has same text format.
i m using the code below to extract text from it,


Code:

Dim sFileName As String 'Name of files within the folder will be stored
Dim i As Integer 'This will count the files read***
Dim wrd As Word.Application
Dim wrdCount As Long 'Number of characters within the file
'Get the first file with extension "DOC" ***
sFileName = Dir$("C:Virology*.DOC") '***
Do While sFileName <> "" '***
Set wrd = New Word.Application 'Create obj of word application
wrd.Visible = False
wrd.Documents.Open "C:Virology" & sFileName
wrdCount = wrd.Documents(1).Characters.Count
Text1.Text = Text1.Text & vbCrLf & i & wrd.Documents(1).Range(0, wrdCount).Text
wrd.Documents(1).Close
Set wrd = Nothing
sFileName = Dir$ '***
i = i + 1
Loop



This works good for all the characters in the document but the problem rises when word textbox appears in the document.

The file for reference is attached.

Extracting Digits From A Number Entered In A Textbox???
One question: I'm inputting a number in a text box, lets assume that the number is 2276340912. I want to extract specific digits out of this number, how do I do this?

Datagrid Help Please How To Auto-requery The Recordset To Update The Datagrid??
I would really appreciate some help. I am trying to get the datagrid to update after inserting some records from another table into it. If I wait a few seconds after the insert, I can do rs2.requery and that works but I would like to grid to refresh on its own if possible. I'm sure there is a way. Below is the sub from the form. The OnLoad just opens the tables, etc. And the other one does the sql statement for inserting. If I wait a few after the insert, I can requery on rs2 and it works. Any suggestions?

Thanks!


Private cn2 As ADODB.Connection
Private WithEvents rs2 As ADODB.Recordset

Dim DbFile As String
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim SQLstmt As String


Private Sub AddCmd_Click()
SQLstmt = "INSERT INTO PR2 SELECT classification, organization, state, email FROM PR1 WHERE Classification = '" & DataList1.Text & "'"
'Get the Records
Set rs = New ADODB.Recordset
rs.Open SQLstmt, cn, adOpenStatic, adLockOptimistic, adCmdText
rs2.Requery
DataGrid1.Refresh
Label3.Caption = "Selected Business Contacts (" & Trim(Str(rs2.RecordCount)) & ")"
End Sub


Private Sub Form_Load()

Set cn2 = New ADODB.Connection
cn2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database1.mdb;Persist Security Info=False"
cn2.CursorLocation = adUseClient
cn2.Open

Set rs2 = New ADODB.Recordset
rs2.Open "pr2", cn2, adOpenDynamic, adLockPessimistic, adAsyncFetch
Set DataGrid1.DataSource = rs2

DbFile = App.Path & "database1.mdb"
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & DbFile & ";" & _
"Persist Security Info=False"
cn.Open

End Sub

Adding Columns To A Datagrid And Binding The Datagrid To A Recordsource
I am working on a program in visual basic 6 that I inherited. I am trying to add a datagrid to a form, add colums to the datagrid(it gives you 2 columns at design time)and bind the datagrid to a recordsource.

I would appreciate any help.
Thanks

How Can I Drag A Cell From One Datagrid And Drop In Antoher Datagrid?
Hi,

I am beginner of VB. I wanna drag a cell from one DataGrid and drop in another one. How could I do that? Anybody knows, plesae give me a help. Thanks in advance!

Click Datagrid Row And Display Details To Another Datagrid
hello there..here i need help. i have a datagrid that retrieve data from database.what i want to do with the datagrid is when i click any rows of the datagrid it can display the details of the data (refer to the row that i click) to another datagrid.

is there possible to be done ?

i want to know if there is any procedure that can capture the datagrid row that i clicked

Refresh DataGrid(Microsoft DataGrid Control 6.0)
Hi,

I am having a problem refreshing the datagrid in the following scenario:

I have Form1 with ADODC control and DataGrid(Microsoft DataGrid Control 6.0). The grid (is used to display employee records) contains 5 columns (for example Office telephone number) . On clicking of a row on the grid the details window opens up. This window is used to update the employee information. On saving the employee record if Office telephone number is changed then the datagrid should be refreshed with latest data of the record. The refresh is done using the following command:
msgbox "activate"
adodcobject.refresh
datagridobject.refresh.

If the message box is commented then the refresh statements do not get executed. I need a solution for that.

Regards,
Rashmi.

Combo In Datagrid(button Property Of Datagrid)
Hi,
We are working on datagrid and want to know how the button property
of the datagrid used. We have been working on this and are stuck as
to how to use each cell of the grid as combo box.

Set Datagrid To Datagrid Returned From Function
I'm creating a DLL and in it, I return a datagrid object to the calling application, however, I can't figure out how to assign the datagrid to an object.

I put a blank datagrid on a form, and I tried putting the following into the Load Sub.

Set dgX = K9().Xdg()

I know that the functions are all working, it's the actual setting of the datagrid on the form, to that of the datagrid returned from the function.

Thanks for any assistance.

- Anthony

Copying A Cell From A Datagrid To Another Datagrid
My question is how to copy a datagrid cell to another datagrid cell?

for example; datagrid1 column 1, row 1 to datagrid2 column 2, row 3

I use

DataGrid1.Columns(1).CellValue(DataGrid1.RowBookmark(1)) to capture the value, but I don't know the expression how to copy to datagrid2

Thanks

How To Transfer Data In A Datagrid To Another Datagrid..?
Please help me in my project so that i can pass..

Im a freashman student in high school,
Im making a simple Computer Hardware Inventory system,

Datagrid1:
Item Description Serial Number Date Recorded
Mouse Optical SN-2007 03/27/2007


Datagrid2:
Item Description Serial Number Date Recorded


I want my data in datagrid1 will transfer to Datagrid2
please solve my problem..

youre help, is a big help to me!
Thank you in advance!! Godspeed!!

How Do I Get This Information Into A Datagrid Control (datagrid)???
I have this information that i want to call out of a file and put into a data grid.
"AL","Alabama"
"AK","Alaska"
"AS","American Samoa"
"AZ","Arizona"
"AR","Arkanzas"
"CA","California"
"CZ","Canal Zone"
"CO","Colorado"
"CT","Connecticut"
"DE","Deleware"
"DC","District of Columbia"
"FL","Florida"
"GA","Georgia"
"GU","Guam"
"HI","Hawaii"
"ID","Idaho"
"IL","Illinois"
"IN","Indiana"
"IA","Iowa"
"KS","Kansas"
"KY","Kentucky"
"LA","Louisiana"
"ME","Maine"
"MD","Maryland"
"MA","Massachusetts"
"MI","Michigan"
"MN","Minnesota"
"MS","Mississippi"
"MO","Missouri"
"MT","Montana"
"NE","Nebraska"
"NV","Nevada"
"NH","New Hampshire"
"NJ","New Jersey"
"NM","New Mexico"
"NY","New York"
"NC","North Carolina"
"ND","North Dakota"
"OH","Ohio"
"OK","Oklahoma"
"OR","Oregon"
"PA","Pennsylvania"
"PR","Puerto Rico"
"RI","Rhode Island"
"SC","South Carolina"
"SD","South Dakota"
"TN","Tennessee"
"TX","Texas"
"TT","Trust Territories"
"UT","Utah"
"VT","Vermont"
"VA","Virginia"
"VI","Virgin Islands"
"WA","Washington"
"WV","West Virginia"
"WI","Wisconsin"
"WY","Wyoming"

And i want to get it into a data grid.
How do i do this??????

How Do I Get This Information Into A Datagrid Control (datagrid)???
I have this information that i want to call out of a file and put into a data grid.
"AL","Alabama"
"AK","Alaska"
"AS","American Samoa"
"AZ","Arizona"
"AR","Arkanzas"
"CA","California"
"CZ","Canal Zone"
"CO","Colorado"
"CT","Connecticut"
"DE","Deleware"
"DC","District of Columbia"
"FL","Florida"
"GA","Georgia"
"GU","Guam"
"HI","Hawaii"
"ID","Idaho"
"IL","Illinois"
"IN","Indiana"
"IA","Iowa"
"KS","Kansas"
"KY","Kentucky"
"LA","Louisiana"
"ME","Maine"
"MD","Maryland"
"MA","Massachusetts"
"MI","Michigan"
"MN","Minnesota"
"MS","Mississippi"
"MO","Missouri"
"MT","Montana"
"NE","Nebraska"
"NV","Nevada"
"NH","New Hampshire"
"NJ","New Jersey"
"NM","New Mexico"
"NY","New York"
"NC","North Carolina"
"ND","North Dakota"
"OH","Ohio"
"OK","Oklahoma"
"OR","Oregon"
"PA","Pennsylvania"
"PR","Puerto Rico"
"RI","Rhode Island"
"SC","South Carolina"
"SD","South Dakota"
"TN","Tennessee"
"TX","Texas"
"TT","Trust Territories"
"UT","Utah"
"VT","Vermont"
"VA","Virginia"
"VI","Virgin Islands"
"WA","Washington"
"WV","West Virginia"
"WI","Wisconsin"
"WY","Wyoming"

And i want to get it into a data grid.
How do i do this??????

How To Get The Value From Listview To The Datagrid By The Datagrid's Button
how to get the value from listview to the datagrid by the datagrid's button.
since the datagrid is empty, so i cant retrieve the value of listview to the datagrid....


and here i had attach a sample... ..
so. pls help me to fix this problem...

DataGrid &amp; ADO -- Why More Than One Datagrid Is Populated With One Query???
Hi,

I have an SStabbed GUI with a datagrid on each tab. I also have ONE ADO connection common to all (i.e. on the main form and not on a particular tab). My problem is that when I run a query to populate a datagrid on one tab, the other datagrids on another tab also gets populated with the same results.

The code is as follows:

    With Adodc1
            .RecordSource = "select * from PalletView where PalletNo=" & txtPalletNo.Text
            .Refresh
    End With
            
    Set dgdPallet.DataSource = Adodc1

For each different query on a tab, all I do is replace the 'dgdPallet' name with another datagrids name.

Any help would be much appreciated.

Thanks, Ash

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                                    **** KNOWLEDGE IS LIMITLESS ! ****
    **** FOR EVERY KNOWLEDGEABLE, THERE EXISTS A MORE KNOWLEDGEABLE ! ****

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Passing The Row Text Of A Datagrid To Another Datagrid
hi everyone, please help me on how to pass the text of the datagrid to another datagrid. in my project, i want the user to click the row of the first datagrid and when he clicked it, it will pass the text of the first datagrid to the second datagrid. plese help me thnx!

How To Copy Data From Datagrid Another Datagrid?
my problem is like that---

now i have 2 datagrid---datagrid1 & datagrid2
and 2 adodc-----adodc1 & adodc2

i have build some text that link with adodc1,i wanna build a command button that when i press it then the data from the text will copy to datagrid 2 and i can save it.


can any 1 show me the way?

thanks

How To Reveal Line Break For Perticuler Textbox In External Richtextbox/textbox?
Hi all could any one show me a method to identify the line break for perticuler richtextbox/textbox in external richtextbox/text. I am looking for things like this :<pbr>

I know all richtextbox/textboxes does not support that and some have thier own line break. could any one show me how to obtain that line break .thanks



class name info of rich edit :

RichEdit20A
#32770
AtlAxWin71
ATL:0053D798
WTL_SplitterWindow
WTL_SplitterWindow
WTL_SplitterWindow
My Window Class

Draw Textbox, Format Border And Type Text Into Textbox In A .doc File
I use this codes to open a .doc file and draw a textbox in it. What should I add to input text into the textbox (I used Selection.Text = "......." but the text are outside the textbox) and format it's borders?
[font=courier new][color=darkblue]
Private Sub Command1_Click()
Dim objWord As New Word.Application
Dim objDoc As Word.Document

objWord.DisplayAlerts = wdAlertsNone
Set objDoc = objWord.Documents.Add

objDoc.Shapes.AddTextbox msoTextOrientationHorizontal, 100, 100, 100, 300

objDoc.SaveAs "C:WINDOWSDesktoplabel.doc", wdFormatDocument
objWord.Quit

cmdEnd.SetFocus

TextBox – How To Invoke ‘Command_Click()’ Upon Carriage Return Press In TextBox
Hi All,

I have a TextBox which I use to enter a serial number and a Command Button to execute a query to a database that takes the value entered in the TextBox.

How do I simulate the ‘Command_Click’ event upon Carriage Return press in the TextBox after entering the serial number? (saves the user having to press the command button using mouse)

Thanks in advance, Ash

Text Dissapears Form Textbox When I Tab Or Click Into Another Textbox
The title says it all really.

I enter text into txtName and then I want to enter text into txtInitial so I either tab to it or click into it and when I do the entry in txtName just dissapears.!!!???!!

I am setting textbox proerties at runtime...

Code:
With txtAddMemName
.Text = ""
.TabIndex = 0
End With
Make sure the textbox is empty....Text = ""
Set the TabIndex....TabIndex = 0 ....and so on
I have all the textbox properties in Private Sub TextBoxProperties() so that the form load section is easier to read.

Is that not right?

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