ms-access

Move data from SQL Server to MS Access mdb

a 夏天 提交于 2020-01-23 07:50:28
问题 I need to transfer certain information out of our SQL Server database into an MS Access database. I've already got the access table structure setup. I'm looking for a pure sql solution; something I could run straight from ssms and not have to code anything in c# or vb. I know this is possible if I were to setup an odbc datasource first. I'm wondering if this is possible to do without the odbc datasource? 回答1: If you want a 'pure' SQL solution, my proposal would be to connect from your SQL

How to use SQLite database from MS Access?

亡梦爱人 提交于 2020-01-23 05:48:06
问题 I would like to use an SQLite database from Microsoft Access (access from- or transfer the contents to Microsoft Access). How can this be done using VBA? This is for a client who can not install extra software: Does a library exist in VBA to use SQLite databases? 回答1: If you can use the sqlite3.exe command line tool, then have VBA spawn that and dump the data to a csv file. Then Access can read both local data and the CSV file and copy appropriately. 回答2: Does a standard library exist in VBA

Programmatically change the connection of a linked table in ms access

最后都变了- 提交于 2020-01-22 20:42:13
问题 I have already referenced other pages for my problem but I still can't get this to work. I feel a bit slow given that I have three examples below and still can't figure this out. Changing linked table location programatically Linked table ms access 2010 change connection string Update an Access linked table to use a UNC path Here is the code that I am using: Dim tdf As TableDef Dim db As Database Set db = CurrentDb Set tdf = db.TableDefs("DeviceListT") tdf.Connect = "ODBC;DATABASE=" &

Programmatically change the connection of a linked table in ms access

两盒软妹~` 提交于 2020-01-22 20:41:06
问题 I have already referenced other pages for my problem but I still can't get this to work. I feel a bit slow given that I have three examples below and still can't figure this out. Changing linked table location programatically Linked table ms access 2010 change connection string Update an Access linked table to use a UNC path Here is the code that I am using: Dim tdf As TableDef Dim db As Database Set db = CurrentDb Set tdf = db.TableDefs("DeviceListT") tdf.Connect = "ODBC;DATABASE=" &

How can I sort the columns in a crosstab query, when the column data is dynamic?

你说的曾经没有我的故事 提交于 2020-01-22 14:39:52
问题 I've been doing a bit of research on this topic and I can't seem either find a workable solution, or one that is explained well enough for me to implement. If you've ever created a crosstab query in Access, you are aware that by default Access sorts your columns in alphabetic order. You can change this order by going to the Properties dialog and entering the Column Headings in the order that you prefer. This is a real pain but, as one answerer mentioned on another site, "It's only a pain once

How can I sort the columns in a crosstab query, when the column data is dynamic?

为君一笑 提交于 2020-01-22 14:38:10
问题 I've been doing a bit of research on this topic and I can't seem either find a workable solution, or one that is explained well enough for me to implement. If you've ever created a crosstab query in Access, you are aware that by default Access sorts your columns in alphabetic order. You can change this order by going to the Properties dialog and entering the Column Headings in the order that you prefer. This is a real pain but, as one answerer mentioned on another site, "It's only a pain once

MS Access VBA trapping SQL Server Connection Error

☆樱花仙子☆ 提交于 2020-01-22 03:38:06
问题 I'm Having problems getting Access (2010) VBA to trap errors for connections to a SQL Server (2008) for linking tables. I'm getting an error and popup windows, presumably from the ODBC Driver? I want to suppress these and handle the error myself. I know about the DAO.errors and ADO.errors collections but these don't help if I can't get the error to call my error handler! The code below will give the error (unless you happen to have a table called myTable in a database called myDatabase on a

Data type mismatch in criteria expression. MS Access VB

夙愿已清 提交于 2020-01-22 03:14:47
问题 ' OK button Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=C:\Users\Jill\Desktop\saddbase\Sadsystem\Sadsystem\bin\Debug\tenant.mdb") Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM info WHERE TN_ID = '" & UsernameTextBox.Text & "' AND Password = '" & PasswordTextBox.Text & "' ", con) con.Open() Dim sdr As OleDbDataReader = cmd.ExecuteReader() ' If the

Data type mismatch in criteria expression. MS Access VB

China☆狼群 提交于 2020-01-22 03:14:39
问题 ' OK button Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=C:\Users\Jill\Desktop\saddbase\Sadsystem\Sadsystem\bin\Debug\tenant.mdb") Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM info WHERE TN_ID = '" & UsernameTextBox.Text & "' AND Password = '" & PasswordTextBox.Text & "' ", con) con.Open() Dim sdr As OleDbDataReader = cmd.ExecuteReader() ' If the

Cascading combo boxes

喜夏-厌秋 提交于 2020-01-22 02:42:06
问题 First, let me preface this by saying I know next to nothing about Access, VBA, or SQL. But, when the boss asks you to do something, you do it. I apologize in advance for poor formatting, improper DB management, and my general lack of knowledge. Anyways, I have a large table in a query that I need to use combo boxes to organize. The query's name is FinalTable, and the Fields that I would like to have the combo boxes named from are ID Maker.Billet Material, ID Maker.Billet Number, ID Maker.Test