473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Help!! Insert into a table using VB


I want to write/insert the value of foundFiles into a table.

How can i paste a value into a table using VB??
Can someone help?
I want to get "FoundFiles(i)" and paste it into a table

Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.FileType = msoFileTypeBinders
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" Binder file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no Binder files found."
End If
End With

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
1 7219
DFS
dim db as database
set db = currentDb()

<your code>
For i = 1 To .FoundFiles.Count
db.execute("INSERT INTO Table (FieldName) VALUES ('" & FoundFiles(i).Name &
"');")
Next i
<your code>

db.close

"Lars Erik Hansen" <ko*********@hotmail.com> wrote in message
news:3f***********************@news.frii.net...

I want to write/insert the value of foundFiles into a table.

How can i paste a value into a table using VB??
Can someone help?
I want to get "FoundFiles(i)" and paste it into a table

Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.FileType = msoFileTypeBinders
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" Binder file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no Binder files found."
End If
End With

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Hardy | last post by:
I would like to reopen this discussion. I need to create this table using SQL that will return this dataset. BRAID RATEDEFID MIN(BRADATE) MAX(BRADATE RATECODE PRODNAME 614 14 12/1/2002...
2
by: Max | last post by:
Hi, I have the following problem. I want to insert records into one table using the combination of two other tables. Here is a simplified example: Let's say the first table has a column with...
4
by: Nathan Sokalski | last post by:
When editing an ASP Table, Visual Studio does not allow me to edit it in Design View. This makes it harder to add elements, because I must add every element either by using Design View to create...
1
by: quartz | last post by:
Hello, I have a txt file with names, years, days. How can I insert table using shell scripting??? Thenks a lot,
13
nabh4u
by: nabh4u | last post by:
hi, I am trying to insert multiple rows in a table using PL/SQL. I have two procedures and two tables. the first procedure gets the data from the source table, manipulates it and then sends the...
0
by: =?Utf-8?B?ZndoaWx0b24=?= | last post by:
Hi, I have reference MSHTML.DLL. I can edit most of the WYSIWYG text when in DesignMode (EditMode). That works fine However, after reading an article on MSDN about the DHTML and TriEdit not...
2
by: qwedster | last post by:
Folk! How to programattically check if null value exists in database table (using stored procedure)? I know it's possble in the Query Analyzer (see last SQL query batch statements)? But how...
0
by: tvnaidu | last post by:
database file gets created using below sql file, then lua script calls "db.import config_ascc", then I get errors says "insert table failed for eventLog", below are my sql file entry, config file,...
1
by: db2maf | last post by:
Hi Gurus, My system: DB2 v9.5_FP0 (Windows). I have two questions that I seek help with: 1. I want to create a table using the following: - db2 create table SCHEMA.DBCFG like...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.