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




How To Insert A Table Into Rich Text Box?


Halo everyone!

I wish to know whether i can insert a table which is created and saved as .html into a Rich Text Box? If it is so, how to achieve it?

Any coding involved? Or i need a convertor program to convert the tabel into RTF format?

Thanks for helping me!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Insert Bar(line) In Rich Text Box
please help me how to insert bar in the rich text box
thank you
naveen

Insert Rich Text Into A Word Doc From Another App?
I am trying to insert Rich text into a Word doc, the source of the RT being another app and I do not want to use the clipboard.

I found this thread:
http://www.vbforums.com/showthread.p...htext+and+word

that describes the reverse of what I'm trying to do. Are there VBA methods in Word that would allow one to move a blob from Access into Word?

Thanks for any pointers or tips.

Doug

extended explaination - I'm not using Access but rather Lotus Notes. I've had a request to find a way to push email data out of Notes into something like Word. Moving the text over is simple but I'm having a hard time figuring out how to retain any fomatting associated with the text..

How Can I Insert Emotions In Rich Text Box
hi Im Amjad
i want to add emotions in rich text box like or when we chat in MSN then we send emotions with text. So how can we do this with rich text box.
plzzz help me for this prb.
thnxxx

Insert From Field In Database Into Rich Text Box
How can i insert the value from a field in a table of a database into a rich text box?

How To Insert Numbered Bullets In Rich Text Box
plase tell me
how to insert numbered bullets in richtext box

Rich Text Box: Insert/Overwrite Function
On a Rich Text Box When i press insert on the keyboard, it switches into overwrite mode (where i type over the characters not add them)

I want to know how to do these things:

Like word i want to add an 'OVR' display to my status bar: i think i know how to, do the status bar bit, but how do i detect if im currently in OVR mode? Trappping the key press was my first thought but i would preffer to detect the setting rather than detect the change due to the insert key press (i hope soomeone understands that)
I think this is a tough one. Like the VB6 ide when you press insert in the code view the text cursor is changed to fit the character it will over write. How do i do this


Thnx in advanced for any replys

--------------------------------------------------
Should I apologize if what I say burns your
ears and stains your eyes?!

Plzzzz Tell Me How I Insert Emotions In Rich Text Box?
hi im Amjad Plzzz tell me how can i insert Icons or images into a rich text box. like plzz help me.
thanxxx

Insert Pagebreak In Rich Text Box Control
Hi!

I am working on a software component. I import plain text files to a rich text box control and automatically format the contents. I do have flags in the plain text and searching that flag, I change the formatting. Now I have some flags which I need to replace with a page break. As I print the contents of the control, I need to have the page breaks. Can somebody help?

Regards,

Kangkan

How To Add A Table Into Rich Text Box?
Halo everyone!

I am seeking help from whoever knows how can i add a table into a Rich Text Box? What if my table is created and saved as .html, can i still insert it into a Rich Text Box?
If can, how to achieve it? Can give me any suggestion on this?

Thanks for helping me!!!

Table In A Rich Text Box
Hi,

I'd like to create a table in a RichTextBox. But i haven't any idea how to solve this problem.

Can anyone help me?

Insert Text Into Rich Text Box
 I got this code from Sole. It works great
Now if the text font in text1 is "arial" and in command1 is "symbol"
When the command1.caption is inserted into the text1, the textfont of the command1.caption inserted in the text1 become "arial'. How to keep the font "symbol" while inserting the command1.caption
I should mention here the text is richtextbox
Thx



Dim ctl As Control
Private Sub Command1_Click(Index As Integer)
Dim intStart As Integer
Dim strText As String
'Get insertion point in Text box
intStart = ctl.SelStart

'Retrieve the current text...
strText = ctl.Text
'..and insert the command button's caption...
strText = Left(strText, intStart) & Me!Command1(Index).Caption & Mid(strText, intStart + 1)
'..and write it back to the text box.
ctl.Text = strText
'Move the insertion point along the length of the caption
ctl.SelStart = intStart + Len(Me!Command1(Index).Caption)
End Sub


Private Sub Text1_GotFocus(Index As Integer)
'When control gets focus set module level variable to show which control has/had the focus.
Set ctl = Me.ActiveControl
End Sub

Table Insertion In Rich Text Box
Please
tell me how to insert table in rich text box
and also send me code
thank you

INSERT INTO A Table Using Text Box
So what I want to do now is have the user input the year of the vehicle, hit the [b]add info[b] button and it should [b]insert[b] the data to the table.
The only real idea I had to do this was assign variables to the text boxes and then insert the value of that variable to my table. I'm not really sure if what I have here is viable, but it's all I could think of other than an array.. which I think I might have to use..


Code:
Set MyRecSet = VehicleInfo.Execute("SELECT Year, Make, Model, Trim, Color, Mileage, Transmission, Engine, Vin FROM VehicleInfo")
Do Until MyRecSet.EOF

strYear = Val(txtYear.Text)
strMake = Val(txtMake.Text)
strModel = Val(txtModel.Text)
strTrim = Val(txtTrim.Text)
strColor = Val(txtColor.Text)
strMileage = Val(txtMileage.Text)
strTransmission = Val(txtTransmission.Text)
strEngine = Val(txtEngine.Text)
strVin = Val(txtVin.Text)


VehicleInfo.Execute ("INSERT INTO VehicleInfo Values('strYear', 'strMake', 'strModel', 'strTrim', 'strColor', 'strMileage', 'strtransmission', 'strengine', 'strvin')") 'i get an error here saying that the number of queries and the destination fields aren't the same




MyRecSet.MoveNext
I'm not really sure What I want to have set up as a code, I tried searching around for an example but I couldn't really find anything. The W3Schools website only had an example of how to insert some data via the actual sql insert into command, not a user initiated thing.

Insert Data From A Text File To A Table
When i use the following insert statment it fails to open the text file, read the lines of data, then insert into my table. However when i hard code the data i.e.

'str_recordid = "test"
'str_acno = "test"

It works!!

What am i doing wrong?
xxG


'Open the database
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; " _
& "Data Source = c:windowsdesktop racking.mdb"
cn.Open

'Open the text file
Set ts = fso.OpenTextFile("c:windowsdesktop10010253136471.txt")

recordid = Mid(sStringToBreakDown, 1, 1)
acno = Mid(sStringToBreakDown, Len(recordid) + 1, 9)

'Open the table
rst.Open "SELECT * FROM tbl_headerrecord", cn, adOpenDynamic, adLockOptimistic

If rst.EOF Then

strsql = "INSERT INTO tbl_headerrecord (recordid,acno)" & _
"','" & "VALUES ('" & str_recordid & "','" & str_acno & "')"

Else

strsql = "UPDATE tbl_headerrecord SET recordid='" & str_recordid & "',acno='" & str_acno & "'"
End If


cn.Execute strsql

Read From Text File Using VB And Insert Into SQL Table Until Eof Text File Reach
Dear All,

my text file like following,

a1, b1, c1, d1, e1
a2, b2, c2, d2, e2
a3, b3, c3, d3, e3
a4, b4, c4, d4, e4
.................

and im going to insert this values into SQL Tables with columns, [a, b, c, d,
e]

how im going to do so? i use below src code to do but i can not get the next
line and next line of text file until it finished insert

Private Sub mot_Click()
'Shell ("C:Program FilesMicrosoft OfficeOffice11MSACCESS.EXE c:fisherdb.
mdb /x ImportOpsNilai")

'frmPicCd.Show
Dim db_connect
' Path = App.Path & "ERP consumable code.xls"

Dim objFSO
Dim objFile, objTextStream
Dim strContent
Const ForReading = 1
Dim FileName, IEPath, strC1 As String
FileName = "U:ureportuopsRepNilai.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.GetFile(FileName)

Set objTextStream = objFile.OpenAsTextStream(ForReading,
TristateUseDefault)

If objFSO.FileExists(FileName) Then

Set objFile = objFSO.OpenTextFile(FileName, ForReading)

'While Not objFile.EOF
strC1 = objFile.ReadLine
Dim word
ReDim word(2)
word = Split(strC1, ",")
' Dim t1, t2, t3 As String
' MsgBox RTrim(LTrim(word(44)))
' t1 = Replace(word(0), """", "")
' t2 = Replace(word(1), """", "")
Dim sql
Dim rs As New ADODB.Recordset
sqldb.Execute ("delete from OPS_Nilai")
rs.Open ("Select * from OPS_Nilai"), sqldb, adOpenDynamic,
adLockOptimistic
With rs
.AddNew
!Field1 = RTrim(LTrim(word(0)))
!Field2 = RTrim(LTrim(word(1)))
!Field3 = RTrim(LTrim(word(2)))
!Field4 = RTrim(LTrim(word(3)))
!Field5 = RTrim(LTrim(word(4)))
!Field6 = RTrim(LTrim(word(5)))
!Field7 = RTrim(LTrim(word(6)))
!Field8 = RTrim(LTrim(word(7)))
!Field9 = RTrim(LTrim(word(8)))
!Field10 = RTrim(LTrim(word(9)))
!Field11 = RTrim(LTrim(word(10)))
!Field12 = RTrim(LTrim(word(11)))
!Field13 = RTrim(LTrim(word(12)))
!Field14 = RTrim(LTrim(word(13)))
!Field15 = RTrim(LTrim(word(14)))
!Field16 = RTrim(LTrim(word(15)))
!Field17 = RTrim(LTrim(word(16)))
!Field18 = RTrim(LTrim(word(17)))
!Field19 = RTrim(LTrim(word(18)))
!Field20 = RTrim(LTrim(word(19)))

!Field21 = RTrim(LTrim(word(20)))
!Field22 = RTrim(LTrim(word(21)))
!Field23 = RTrim(LTrim(word(22)))
!Field24 = RTrim(LTrim(word(23)))
!Field25 = RTrim(LTrim(word(24)))
!Field26 = RTrim(LTrim(word(25)))
!Field27 = RTrim(LTrim(word(26)))
!Field28 = RTrim(LTrim(word(27)))
!Field29 = RTrim(LTrim(word(28)))
!Field30 = RTrim(LTrim(word(29)))
!Field31 = RTrim(LTrim(word(30)))
!Field32 = RTrim(LTrim(word(31)))
!Field33 = RTrim(LTrim(word(32)))
!Field34 = RTrim(LTrim(word(33)))
!Field35 = RTrim(LTrim(word(34)))
!Field36 = RTrim(LTrim(word(35)))
!Field37 = RTrim(LTrim(word(36)))
!Field38 = RTrim(LTrim(word(37)))
!Field39 = RTrim(LTrim(word(38)))
!Field40 = RTrim(LTrim(word(39)))

!Field41 = RTrim(LTrim(word(40)))
!Field42 = RTrim(LTrim(word(41)))
!Field43 = RTrim(LTrim(word(42)))
!Field44 = RTrim(LTrim(word(43)))
!Field45 = RTrim(LTrim(word(44)))
.Update

End With
'objFile.SkipLine
'objFile.MoveNext
' Loop
End If

objTextStream.Close
MsgBox "Update completed!!!", vbOKOnly + vbInformation, "Fisher Nilai"
End Sub

kindly advice


thank you

--
Message posted via VBMonster.com
http://www.vbmonster.com/Uwe/Forums...vbasic/200707/1

Insert In Table Certan Values That Are "LIKE%" Text1.text
How can I insert in table certan values that are "LIKE%" Text1.text ?

Here is code that I've written by now.

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)


Picture1.Cls

Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Dim broj1 As String, mjesto1 As String

Set MyConn = New ADODB.Connection

MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=I:PekaraPodacipekara.mdb;"
MyConn.CursorLocation = adUseClient
MyConn.Open

Set MyRecSet = MyConn.Execute("Select * from Mjesta WHERE Mjesto LIKE '" & Text1.Text & "%'")

If MyRecSet.BOF = True And MyRecSet.EOF = True Then Exit Sub

sqlStr = "INSERT INTO Pregled_mjesta (Post_broj, Grad) Values (broj1, mjesto1)"

Do While Not MyRecSet.EOF

Picture1.Print MyRecSet.Fields.Item("Postanski_broj").Value _
& " " & MyRecSet.Fields.Item("Mjesto").Value

broj1 = MyRecSet.Fields.Item("Postanski_broj").Value
mjesto1 = MyRecSet.Fields.Item("Mjesto").Value

Debug.Print sqlStr

'Set MyRecSet1 = MyConn.Execute(sqlStr)
MyConn.Execute (sqlStr)

MyRecSet.MoveNext

Loop

DataGrid1.Refresh
Adodc1.Refresh
MyConn.Close


End Sub


it gives me error in line

MyConn.Execute (sqlStr)


and error is

Run-time error '-2147217904 (80040e10)':
No value given for one or more required parameters.

Please help me

Word 97: How To Insert A Table Into An Existing Table Cell
Does anyone know how I can insert a New Table into a cell of another table?

In Word 2000, I can issue the following code when I am within a cell of a table and the table gets inserted correctly:

Dim rRange As Range, myTable As Table
With Selection
    Set rRange = .Range
    Set myTable = rRange.Tables.Add(Range:=.Range, NumRows:=2, NumColumns:=4)
End With

However, in Word97, I am not able to do this. I get an error telling me that a table already exists. Has anyone had any success with being able to insert a new table into a cell of an existing table without doing a lot of cell/row inserts and cell merges?

How To Insert Table Into A Cell Of Another Table Using Word Object
hi friends,

i have inserted a table into word do using word object through VB

wddoc.tables.add selection.range, 2, 4

now i wanto to insert a table into the cell of the table created.

can u help me how to do that

i have tried like this

wddoc.tables(1).cell(1,1).range.tables.add selection.range,2,4

but i am getting an error saying that table already exists in that location,

PLEASE HELP ME OUT!!!!!

thanx

How To Insert Table Into A Table Cell Of Word
hi friends,


i am creating a word doc from VB and then i want to insert tables into it. i am inserting table in the following manner

wdapp.ActiveDocument.Tables.Add selection.range, 4, 1
wdapp.ActiveDocument.Tables.Add selection.range, 2, 2

but it is able to create the first table but not the second table. it is giving a error message saying that table already present in the location.

can u tell me how to insert 2 or more tables into the word doc through coding

thanx,

Bulk Insert: Copy Table To Table?
I have a client that copies all data from one table to another every
week.
We use DTS at the moment, but someone said that it could be
done with T-SQL Bulk insert.
Did some reading, but I can't figure out how to use a table as input...

Info: SQL server 2000. Table size is 3 GB
It is slow, maybe Bulk is faster.
The log file growes to 6 gb.
I tried exporting to file and import using BCP, but found no performance
increase.

I searched the forum but didn't find anything on table to table copy.

/Jerry

Create New Table And Insert Values In It From Another Table
Hi all

What I wanna do is create new table and insert values in it from another table based on query, but I always get error

Error = 'Runtime error 3704: - Operation not allowed when the object is closed'

here is code


Code:


Private Sub mnuZadnji_kontakt_s_klijentom_Click()

Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Dim MyRecSet1 As ADODB.Recordset
Dim ime As String
Dim prezime As String
Dim datum As String
Dim gsm As String
Dim telefon As String

Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & rut & "';"
MyConn.Open
MyConn.Execute "CREATE TABLE zadnji_kontakt_klijent (Datum TEXT (50), Ime TEXT (50),Prezime TEXT (50), GSM TEXT (50), Telefon TEXT (50))"

Set MyRecSet1 = MyConn.Execute("SELECT * FROM klijenti order by prezime desc")

Do Until MyRecSet1.EOF

ime = "" & MyRecSet1.Fields.Item("ime").Value
prezime = "" & MyRecSet1.Fields.Item("prezime").Value
telefon = "" & MyRecSet1.Fields.Item("telefon").Value
gsm = "" & MyRecSet1.Fields.Item("gsm").Value
datum = "" & MyRecSet1.Fields.Item("dat_uklj").Value

Set MyRecSet1 = MyConn.Execute("INSERT INTO zadnji_kontakt_klijent (Datum, Ime, Prezime, GSM, telefon) Values ('" & datum & "', '" & ime & "', '" & prezime & "', '" & gsm & "', '" & telefon & "')")


MyRecSet1.MoveNext

Loop

MyConn.Close
End Sub

How To Insert Table Into A Table Cell Of Word
hi friends

i want to add a table inside a table cell, i am using the following code to achieve this, but i am getting and error saying that the table is already located in the location. i think there is some problem with the range.

wdapp.ActiveDocument.Tables(2).Cell(2, 1).Range.Tables.Add wdapp.ActiveDocument.Tables(2).Cell(2, 1).Range, 2, 1

thanx,

How To Insert Table Into A Table Cell Of Word
hi friends

i want to add a table inside a table cell, i am using the following code to achieve this, but i am getting and error saying that the table is already located in the location. i think there is some problem with the range.

set drange=wdapp.ActiveDocument.Tables(2).Cell(2, 1).Range
wdapp.ActiveDocument.Tables(2).Cell(2, 1).Range.Tables.Add drange, 2, 1

i am using word 8.0 dll i.e word 97
thanx,



------------------------------------------------
Good Friend...
------------------------------------------------

Insert Data To A Table From Another Table Which Is In Another Database
Can anyone help me

I want to insert data to a table from another table which is in another database through VB 6.0

bala

Usling Clip Board API To Insert 2 Images In Rich Txt Box
Hello I am trying to inset insert 2 images in to rich text box, this is what I have tried:

Using OLE:
RichTextBox1.OLEObjects.Add , , strPicDestination
But the problem with this method is that it places a thumbnail into the text box and opens the image up with MS paint
Also I cant control the location of where the image is inserted

Then someone recommended me to use windows API in user32.dll you have SendMessageA that allows you to paste the image into rich text box from a clip board
You can find the exact syntax of how I am doing that here:

http://www.vbexplorer.com/VBExplorer/q&aform.asp

Anyways my problem is:

When I try to paste more then one image this way, the previous image gets replaced by the new images, so that I have only 1 images in a rich text box at all times.

I am not sure what is the cause of this could anyone think of why this happens

THANK YOU

PS
This is the syntax in a more confusing way if the link doesn’t work


Code:
Option Explicit

Private Const WM_PASTE = &H302
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Sub Form_Load()
RichTextBox1.Text = "hi, hello, how are you doing ?"
End Sub

Private Sub Form_Resize()
With Command1
RichTextBox1.Move 0, 0, ScaleWidth, ScaleHeight - .Height
.Move 0, ScaleHeight - .Height, ScaleWidth
End With 'Command1
End Sub

Private Sub Command1_Click()
Dim lngStart As Long
Dim strFind As String
Clipboard.Clear
Clipboard.SetData LoadPicture("C:Program FilesMicrosoft Visual StudioCommonGraphicsBitmapsAssortedBALLOON.BMP")
strFind = "hello,"
With RichTextBox1
lngStart = Instr(.Text, strFind)
.Text = Left$(.Text, lngStart - 1) & Mid$(.Text, lngStart + Len(strFind))
.SelStart = lngStart - 1
SendMessage .hwnd, WM_PASTE, 0, 0
End With 'RichTextBox1
End Sub

Insert Values Into Table From Same Table
this is my sql statement. (doesn't work)

sql = "INSERT INTO tblIncome VALUES(Date) SELECT DateAdd(""ww"",2,MAX(Date)) FROM tblIncome"

I want to insert a new record with the 'date' field 2 weeks after the last 'date' field in the table.

Insert Values Into Table From Same Table
this is my sql statement. (doesn't work)

sql = "INSERT INTO tblIncome VALUES(Date) SELECT DateAdd(""ww"",2,MAX(Date)) FROM tblIncome"

I want to insert a new record with the 'date' field 2 weeks after the last 'date' field in the table.

How To Insert A Table Records Into Other Table
As per title i want to insert a table's records into other table, or u can say copy records from one table to other tabel, what shoul be sql query.?

How To Insert Table Into A Table Cell
hi friends

i want to add a table inside a table cell, i am using the following code to achieve this, but i am getting and error saying that the table is already located in the location. i think there is some problem with the range.

wdapp.ActiveDocument.Tables(2).Cell(2, 1).Range.Tables.Add wdapp.ActiveDocument.Tables(2).Cell(2, 1).Range, 2, 1

thanx,

Microsoft Word Table In {rich}textbox
hello guys,

I have a tablular data form created in microsoft word and i want it to be pasted in a textbox in VB and then store it in SQL.The tabular lines which are visible in word should also be there in the textbox in vb.

Help plz.

How INSERT INTO At The End Of The Table?
Hello,

I am starting on this.
I want to insert some records from txt file into a access.
The problem is that the INSERT INTO is not at the end of the table.
Sample, I have these lines in txt file:
1 xxxxx
2 xxxxx
3 xxxxx
4 xxxxx
.
.

And after the program ran I have:
1 xxxx
4 xxxx
3 xxxx
.
.

How can I do the INSERT INTO at the end of the table?
Here is my code:


Do While Not EOF(FF)
Line Input #FF, line
MsgBox (line)
strarray(0) = Mid$(line, 1, 4)
strarray(1) = Mid$(line, 5, 2)
strarray(2) = Mid$(line, 7, 2)
strarray(3) = Mid$(line, 10, 2)
strarray(4) = Mid$(line, 12, 6) 'location
strarray(5) = Mid$(line, 18, 2) 'trip
strarray(6) = Mid$(line, 20, 3)
strarray(7) = Mid$(line, 23, 1)
strarray(8) = Mid$(line, 24, 3)
strarray(9) = Mid$(line, 27, 3)
strarray(10) = Mid$(line, 30, 4)
strarray(11) = Mid$(line, 34, 6)
strarray(12) = Mid$(line, 40, 6)
strarray(13) = Mid$(line, 47, 1)
strarray(14) = Mid$(line, 48, 1)
strarray(15) = Mid$(line, 49, 1)

MsgBox (strarray(0) & " " + strarray(4) & " " & strarray(5))

statement = "INSERT INTO agcat98DB (year1, month1,day1, area,location, trip, anglers, vestype,vessel, " & _
" species, number1, lbs, collection ," & _
" tripflag, dupflag, locflag ) " & _
" VALUES (" & " ' " & strarray(0) & "' " & ",'" & strarray(1) & "'," & "'" & strarray(2) & "'," & _
"'" & strarray(3) & "'," & "'" & strarray(4) & "'," & "'" & strarray(5) & "'," & _
" ' " & strarray(6) & "'," & "'" & strarray(7) & "'," & "'" & strarray(8) & "'," & _
" ' " & strarray(9) & "'," & "'" & strarray(10) & "'," & "'" & strarray(11) & "'," & " '" & strarray(12) & "'," & _
"'" & strarray(13) & "'," & "'" & strarray(14) & "'," & " ' " & strarray(15) & "'" & ")"

MyConn.Execute (statement)

Loop
' Debug.Print strData
Close #FF
MyConn.Close



Thanks a lot,

Insert Into Table
Hi
This code is true
str = "select bestankar,bedehy from listmoshtary where [idnom]='" & Text2.Text & "' "
Datamoshtary.RecordSource = str
Datamoshtary.Refresh
Datamoshtary.UpdateControls


but this code is false , why ?
str = "insert into listmoshtary (bestankar) values('901') "
Datamoshtary.RecordSource = str
Datamoshtary.Refresh
Datamoshtary.UpdateControls

Please help me,
Mansoor Abdi

Insert Into MS SQL TABLE
Hi Guys,

I have never used Ms SQL database,so now I have a project that need to be done on this database,so I have been trying to insert files into my files table,it keep on giving error that says "[SQL Server]String or binary data would be trancated",so I have the copy of Design Table with all the fields so that any one kind may be able to assist me,

TABLE: files
Field Name Type Size Key
1 cid Integer 0
2 file_no String 254
3 prefix_id Integer 0
4 file_no_hash String 250
5 frp_id Integer 0
6 ownfrp Boolean 0
7 retention_date DateTime 0
8 acl_id Integer 0
9 ownacl Boolean 0
10 security_id Integer 0
11 cutoff Boolean 0
12 comments String 250
13 creation_date DateTime 0
14 cross_ref String 250
15 subject String 250
16 sujet String 250
17 desc_eng String 500
18 desc_fre String 500
19 parentfile_id Integer 0
20 primary_no Float 0
21 filetype_id Integer 0
22 start_date DateTime 0
23 status String 1
24 essential String 1
25 pib_no String 30
26 ati_no String 30
27 close_date DateTime 0
28 authority_no String 28
29 holdflag String 1
30 rowver Integer 0
31 rowlockstamp Integer 0
32 rowid Blob 0
33 isvital Boolean 0
34 vital_period Smallint 0
35 vital_review_date DateTime 0

Only field cid is an automatic value,the rest I need to get values for them.
So I will appriciate if someone can write me an Insert Statement that I can use on my vb Program,Please!!!

Insert Into Table
hi,
I can insert a new user using the following commandtext.


Code:
MySQL.CommandText = "insert into UserList (UserName, Password, Status, Time) values ('aterina', 'aterina', 'U', getdate())"

However, I need to do the same thing using strings such as


Code:
str1="aterina"
str2="aterina"
str3="U"
MySQL.CommandText = "insert into UserList (UserName, Password, Status, Time) values (str1, str2, str3, getdate())"

This does not work because of the ' and " difference. How can I solve this problem?

ps: I need to use this because I will send these strings as input parameters to the insert function.

Insert Into Same Table
I am trying to move information from one field to another in the same table of an access database. The Select is working correctly as the query in datasheet view shows the correct number of records, but the Insert portion is not working (Even though it tells me it is going to append 263 rows).


Code:
INSERT INTO activity ( ProjNumber )
SELECT Activity.StudyNotes
FROM Activity
WHERE Len([studynotes])=7;
Is this possible to do in a query or do I need to do this programatically and loop through a recordset to get this to work?

Thanks in advance.

Insert Into Table?
See attached.

Basic scenario:- I have a text file with a long line a characters ,called test.txt. I need to chop the text up into meaningful fields, then insert into my table.

Why wont this code insert data from my text file into my table?. It looks like it works as the ASP doesnt generate any errors, however my table is left blank.
??

Can't Insert Into The Table.why?
hi all,

i'am stuck now.i am trying to insert the data into one of the table in my database,but then the err "ODBC Driver does not support the requested properties" occured.i have try to insert a simple data into it.but the err stil occured.what can i do to solve this kind of problem?anyone have an idea on this?please help.thank you in advance.

Insert New Row Using Ole/vb At The End Of A Table
Hi all

I have tried to find more information on how to add or insert a row at the end of a table in word using ole from vb.

No luck

I have this table:

Set oTable = objWD.ActiveDocument.Tables.Add(Range:=MyRange, _
        Numrows:=recCountDoub, numcolumns:=7)

and have filled all cells, but I need a way to dynamically add a number of extra rows at the end when needed by the program.

I also would like to know if anyone knows how to find the location at the very end of the document and how to select it?

Thankyou to all who help

Nick Wood

Insert Into Table
Hello -

I have a functioning recordset that I loop through, and then need to pump the data into an existing static table called tmp_Romis. For some reason I am getting this message: "Syntax error (missing operator) in query expression stat.sd107 Insert Into tbl_Romis...none of the data goes into the table...

Here is my code and any observations are appreciated:

'Next pull back the ROMIS data into the rsRomis recordset
                        sSql = "Select * FROM stat "
                        sSql = sSql & "INNER JOIN tran ON stat.K002 = tran.k002 "
                        sSql = sSql & "WHERE stat.sd107 = 'C' OR stat.sd107 = 'D' ORDER by stat.sd107"
                        'sSql = objADO.ExecuteSQL(sSql, True)
                        Set rsRomis = objADO.RSWithSQL(sSql, True)
                           
                            'Put some of the data into the static table called tmp_Romis
                                If rsRomis.RecordCount > 0 Then
                                  rsRomis.MoveFirst
                                Do Until rsRomis.EOF
                                    'Add new records into tmp_Romis
                                    sSql = sSql & "INSERT INTO tbl_Romis (sd107, e052, a001, k002, a002r, d046d, c042)"
                                    sSql = objADO.ExecuteSQL(sSql, False)
                                    rsRomis.MoveNext
                            Loop
                        End If

Thanks if you can help!!!

Cyndi Brown

Insert Table Or CSV
Hi all,

I want insert a excel table or csv files into a program for edit and checking, how can I do, any sample code?

Thanks

Kel

(VB 6.0) How To Insert Into Table ?
Sir,
I use visual basic 6.0 and MSAccess and ADODB. With MSAccess I've created a table named 'MyOwnData' with three fields: Billno, Description, Amount. On the form I have one labelarray named Label1 having 6 labels and one textarray named Text1 having 6 textboxes. I want that with the click of a button,the captions of all the 6 labels and the value of all the 6 textboxes should be inserted into MyOwnData table in Description and Amount fields respectively. In the Billno field only one number should be repeated 6 times from Text2.

For this I wrote the code like this but failed. Please advise how to get the captions of all 6 labels and insert them into the table. Thanks.

Private Sub Command1_Click()

Dim i as integer

for i = 0 to Text1.Count - 1
Con.Execute "insert into MyOwnData values('" & Text2 & "','" & Label2(i) & "','" & Text1(i) & "')"
Next


pkb_pkb

Dispalying Text In Rich Text Box Control In A Long Single Line
Hi,
In my application I have a rich text box.

But when i do
text1.text = a string of length 500. the string is divided into the width of the text box and is shown in multiple lines.

I want this to be shown in a single line.

Example:
Currently it is displayed as:
__________________________
|aaaaaasdfasdfasdfasdfasdsdf|
|fgasdfasdfadsfasdfasdfasdfaf|
| |
| |
|_________________________|

I want this to be displayed in a single line ....but the multiline property should be enabled ...so that i can add more lines to it.
I have already put scrollbars= "rtfBoth" and disablenoscroll = true.
Please help me with this. It would be great help.

Thanks.

Adding Text To Rich Textbox Without Changing Format Of Existing Text?
Hello all. This is my first time working with RTB's, and I'm having a little trouble getting started. I'm sure it's some little problem of syntax/semantics, but I can't figure it out. A little help would be greatly appreciated!

I have a RTB to which I am trying to add texts of different formats. When I add each string, the entire box text takes the most current format. This makes perfect sense to me, as I am essentially rewriting the ENTIRE textbox (I am using the ".Text = .Text & "NEWTEXT" format that I am accustomed to using for textboxes.

What am I doing wrong? Thanks!


VB Code:
'1.  Create a new form.'2.  Add a button named butGo.'3.  Add a RTB named rtbText.'4.  Cut & Paste the procedure below. Private Sub butGo_Click()Static Counter As IntegerCounter = Counter + 1With rtbText    Select Case Counter        Case 1: .Font.Size = 16                .Font.Bold = True                .Text = .Text & "This is a test..."        Case 2: .Font.Size = 12                .Font.Bold = False                .Text = .Text & "This is only a test!"        Case 3: .Font.Size = 6                .Font.Italic = True                .Text = .Text & "  Can you see me?"    End SelectEnd WithEnd Sub

Rich Text Box - Scrolling To Line Where Text Was Found With The Find Method
When I use the Find method of the rich-text box, the rtb automatically positions the line where the text was found at the bottom of the control. Is there a way I can make the found line automatically scroll to the top of the control?

Inserting My Own Text Into Rich Text Control Without Losing Previous Formats
Dears

I'd like to paste my own text into that control, but after attched code will be executed I'll get text in normal "text" style without changed fonts etc. How it needs to be done?

Dim Position As Long
Dim Buffer_Before As String
Dim Buffer_After As String

    Position = RichTextBox3.SelStart 'the place to insert desired text
    
    If RichTextBox3.SelLength > 1 Then
       RichTextBox3.SelLength = 1
    End If

    RichTextBox3.SelStart = 0
    RichTextBox3.SelLength = Position
    Buffer_Before = RichTextBox3.SelText 'first part of the text

    RichTextBox3.SelStart = Position
    RichTextBox3.SelLength = Len(RichTextBox3.Text) - Position
    Buffer_After = RichTextBox3.SelText 'second part
    RichTextBox3.TextRTF = Buffer_Before & "##Place##" & Buffer_After

How To Apply Custom Font To Text Box Or Label Or Rich Text Box
I am developing an application where i had to set custom font to a text box or a label or a rich text box. Can anyone suggest me the way i can do it.

Regards,
balu

Why Is Rich Text Box Not Showing Real Structure Of Text File
hello,

my problem is the following :

i am loading a textfile in a richtextbox but it is not corresponding to the real structure of the textfile

can this be solved or is there another way to show a textfile on a form?

i added the textfile and a screenshot of the richtextbox(u can open it with clipboard viewer)

thnx

Insert A Word Table
first of all: sorry about my english ... (i'm spanish girl)
now:I am handling a project who have to insert in a word document a table in specific line of these document... but the insertering does not have to delete the previuos lines...ether the following lines...

i used these code...

Set myRange =wrdApp.ActiveDocument.Range(1,1)
Set myTable =wrdApp.ActiveDocument.Tables.Add(myRange, 1, 3)
myTable.Cell(1, 1).Range.InsertAfter "Servicio"
...

but i prefer to use a bookmark...
can u help me?, please...

Insert Values From Vb To Table
How can I create or insert values that I have in VB to Access Table?
Now I have value: Test = 2 in code, but how can I Store it to my table for later use?

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