PC Review


Reply
Thread Tools Rate Thread

how do i create an update sql statement with variants?

 
 
=?Utf-8?B?U25vd3lwYXdz?=
Guest
Posts: n/a
 
      10th Jun 2005
I have code that will import files from the records listed in a table. Once
the file is imported, I create three fields in the table. After that, I need
to update the Source field in the table that I just created with a value from
the importable such as varH?


I have tried:

Dim SQL As String
SQL = "UPDATE varH " & "SET varH.Source = varH "
DoCmd.RunSQL SQL

Below is the code that it should be inserted into:

Private Sub cboImportFileSelect_AfterUpdate()
Dim varA As Variant
Dim varX As Variant
Dim intX As Integer
Dim intY As Integer
varA = Me.cboImportFileSelect

Dim varH As Variant
Dim varI As Variant
Dim varJ As Variant
Dim varK As Variant

varH = Me.cboImportFileSelect
varI = Me.cboImportFileSelect.Column(1)
varJ = Me.cboImportFileSelect.Column(2)
varK = Me.cboImportFileSelect.Column(3)

DoCmd.TransferSpreadsheet acImport, varI, varH, varJ & varK, True, ""

Call AddSource(varH, "Source") 'Creates source field
Call AddSourceDatabase(varH, "SourceDatabase") 'Creates SourceDatabase
field
Call AddCounter(varH, "ConversionID") 'Creates ConversionID

MsgBox "update complete"

End Sub



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Create Update Statement Looch Microsoft ASP .NET 0 14th Feb 2008 09:11 PM
Select statement after the sqldataadapter Update statement Igor Microsoft ADO .NET 6 19th Dec 2007 06:44 AM
converting variants that contain safe arrays of variants =?Utf-8?B?Sg==?= Microsoft C# .NET 0 28th Nov 2005 01:25 AM
I need to create an IIF statement in an update query help!! =?Utf-8?B?VHV0eW8=?= Microsoft Access Queries 3 12th Apr 2005 08:32 PM
Create a block for variants of my specific email address =?Utf-8?B?TWFyaw==?= Microsoft Outlook Discussion 0 22nd Feb 2005 01:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:55 AM.