473,545 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Supress Update Records Question - Answer Yes?

misscrf
13 New Member
I have put this code together (from various posts on the web and the help file...)

It loops through a folder of CSVs and imports them into a table, updating a column with the file name. What I am stuck with is that it asks me Yes or No do I want to update the records for the update part. Anyway I can get it to just answer yes?

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Command0_Click()
  3. Dim strDocPath As String
  4. Dim strCurrentFile As String
  5.  
  6. strDocPath = "O:\ProjectShare\123456 Project\test\"
  7. strCurrentFile = Dir(strDocPath & "*.csv")
  8.  
  9. Do Until strCurrentFile = ""
  10.  
  11. DoCmd.TransferText acImportDelim, "myspecs", "tblCSV", strDocPath & strCurrentFile, -1
  12. DoCmd.RunSQL "UPDATE tblCSV SET tblCSV.FileName =  """ & strCurrentFile & """ WHERE tblCSV.FileName Is Null"
  13. strCurrentFile = Dir
  14. Loop
  15.  
  16. End Sub
  17.  
Thanks!!!
Feb 5 '09 #1
3 1200
ChipR
1,287 Recognized Expert Top Contributor
DoCmd.SetWarnin gs False

You should set it back to True after you are done though.
Feb 5 '09 #2
misscrf
13 New Member
Thanks! this is all I needed. I kind of feel stupid for not thinking of it. I think I just wasnt sure how it would know I wanted yes and not no.
Feb 5 '09 #3
ChipR
1,287 Recognized Expert Top Contributor
Don't feel bad, I still remember looking for the answer to the same question myself. Who's going to read all the functions of DoCmd?
Feb 5 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4514
by: LRW | last post by:
I'm creating a simple reply form, and if a form item isn't answered I get an error: "Notice: Undefined index: rb_amntspent in c:\inetpub\wwwroot\mackinaw\survey.php on line 36" even if in the code I allow for an unselected item. (Code at the bottom here.) It works fine otherwise. Now in the past I've made a change to php.ini to repress...
33
4244
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and setting default value to a UDF that manages the auto-numbering. Access won't take a UDF as a default value. Okay, I'll use SQL WITHOUT any...
9
4284
by: Geraldine Hobley | last post by:
Hello I'm getting the above mentioned error in my applicatio I have a datagrid bound to a datasource like s MyDatagrid.DataSource = Mydataset.Tables(Order) - this all works fine However I have another field on the form which is a richtextbox and is bound to another field in the same datasourc like s ...
3
1509
by: Yakimo | last post by:
Hi I am trying to append some records form tmpSource to tmpDest table using datasets Tables tmpSourec and tmpDest are identical. My setup is the following: - daSource - data adapter for source table - daDest - data adapter for Dest table (containing select, update, delete and
5
5570
by: Louis LeBlanc | last post by:
Hey folks. I'm new to the list, and not quite what you'd call a DB Guru, so please be patient with me. I'm afraid the lead up here is a bit verbose . . . I am working on an application that uses very high volume DB transactions - in the order of tens of millions per day . . . Anyway, the current database which will remain nameless, but...
1
2117
by: Jack | last post by:
Hi, I got a test asp page which connects to Northwind.mdb database. This page pulls all the rows from the Customers table. One column i.e. GoodStatus has been added to the customers table. The following is the code to display all records of the customers table with some customization. CODE: <%@ Language=VBScript %> <!-- #include...
16
3464
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record in a hidden field) I wish the user to be able to edit the data in the table, so I have extracted the records into hiddenfield, textareas, dropdown...
7
1865
by: bbasberg | last post by:
Hello, I thought I would do a "sanity check" by asking the experts how to do the following: I need to process external data (it will be in an Access DB table and will be updated daily) into a local Access DB table that has the same structure with additional fields. The local table is prexisting and the designer used an autonumber field as...
1
2169
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the excel file has links to other excel files within it. When my program reaches this slide, it opens the powerpoint slide, then opens the excel file, then...
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7411
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.