If you import using a two stage strategy. You can import to a holding table, using text fields right the way through, then on the second stage moved the data to formatted tables. Using this method you have more control over ill formatted data during the import process.
The first procedure puts 'Extended Properties=""' into the connection string and that creates the 3001 error.
Becaise the second procedure do not use this argument that connection works. If you include the 'Extended Properties=""' line into the second procedure's connection string, you get the...
In Access 2003, from the menu
Tools/ Options/
"Edit/Find" Tab
Locate "Confirm" Panel (Top Right)
Unclick Action Queries to run action queries without confirmation.
This is a way you could do it
Dim fso As FileSystemObject
Dim fil As File
Dim strFileName As String
Dim lngFileSize As Long
strFileName = Me.Application.CodeProject.FullName
Set fso = New FileSystemObject
Set fil = fso.GetFile(strFileName)
lngFileSize = fil.Size
You cannot rename a field with SQL in Access, but you would be able to:-
1. Add a column
2. Perform an Update to the new column name
3. Then Delete the Original Column
Try recreating the access database from scratch (ie a blank one).
Create a form with a button one it and paste your code into the click event, don't forget the OpenADOQueryConnection procedure.
I have done this with your code and it works, so it looks like there maybe a problem with the access...
I saved your example data into a text file and created a table using the following command
CREATE TABLE [dbo].[tblImport](
[ID1] [varchar](50) NOT NULL,
[ID2] [varchar](50) NOT NULL,
[ID3] [varchar](50) NOT NULL,
[Firstname] [varchar](50) NOT NULL,
[Lastname] [varchar](50) NOT NULL
) ON...
try this...
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Set rs = CurrentProject.Connection.Execute("SELECT dbo.sf_getStdPremium_R2(2, 0, 2, 2, 2, 2)")
Me.txtFunction = rs(0)
You can Run the Mail Merge via OLE and have your users supply parameters. I do not think you can show the Word Mail Merge Wizard Form from within Access.
Yes it does. You only need to select the cells and then run the macro. Your macro is syntaxically correct. I know that for sure because I have copied your code and run it behind a button
Since you have populated your combobox, the code to update the textbox once the combox has been updated with a value from the dropdown is as follows:-
Private Sub Combobox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Combobox.TextChanged...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.