ms-access

Generate INSERT INTO statements in MS-Access

别来无恙 提交于 2019-12-25 08:02:23
问题 I like to export data (single records) from one Access database to another one in another country. The idea is that I want to send a text file with INSERT INTO statements per email and the receiving PC just executes these INSERT INTO statements. I wrote already the code to read and execute the INSERT INTO statements in these text files. Obviously I have to generate the INSERT INTO statements. Here is an example. I have the following table: Table1 Id number PersonName text DoB date, can be

MS Access form does not refresh when using ODBC link to MySql

Deadly 提交于 2019-12-25 07:58:48
问题 I have a front-end Access 2007 database connecting to MySql tables using MySQL ODBC connector. The problem is that a form linked to a table will not refresh its data if the data are changed by another user on the network or if the data was changed by a pop-up form. If I create a VBA code which detects the change and then refresh the form or requery, then the form which shows many records in a table like format, will jump to its top, and some users will lose the sight of the record which is

Return query name Access SQL

萝らか妹 提交于 2019-12-25 07:50:05
问题 In an already existing table I would like to create a new column containing the name of the query I am using. For example: ID Name ----------- 1 Max 2 Jack The desired output is: ID Name Query ------------------- 1 Max QueryName 2 Jack QueryName 回答1: I think you can use a static value field in your query, like this: SELECT ID, NAME, "QueryName" AS Query FROM yourTable; When you just want to add a column with a static value in result of querying a table, above is the solution, If you want to

SQL Access Query like expression not working

隐身守侯 提交于 2019-12-25 07:49:50
问题 I'm trying to test a query using 'like' but i'm not getting any results back. I tried using UPPER() but when I executed the query, access said that UPPER was undefined? SELECT ITEM.Category, ITEM.Description FROM ITEM WHERE ITEM.Category LIKE '%Plate%'; 回答1: Try this SELECT ITEM.Category, ITEM.Description FROM ITEM WHERE ITEM.Category LIKE '*Plate*'; 来源: https://stackoverflow.com/questions/21396755/sql-access-query-like-expression-not-working

Using results from a query within the same query

不羁岁月 提交于 2019-12-25 07:49:47
问题 I have a rather big SQL statement that I am working with in MS Access 2010. Here it goes: SELECT W.ID AS wid, W.wpt_ty AS ty, W.wpt_num AS num, W.wpt_nxt AS nxt, W.latdeg AS lat, W.londeg AS lon, W.alt AS alt, W.mission_id AS mid, W.ctg1 AS ctg1, W.ctg2 AS ctg2, W.ctg3 AS ctg3, W.ctg4 AS ctg4, W.wpt_index AS indx, W.vel AS vel, W.tu AS tu, R.route_num AS rnum, R.AC_num AS ac, R.route_type AS rtype, R.LastUpdatedOn AS d8, R.LastUpdatedBy AS auth, R.flight_wpt_count AS wfcount, M.mission_name

Long Text Field over 255 Characters gets truncated

五迷三道 提交于 2019-12-25 07:46:36
问题 Not sure why my field in my query is getting truncated upon the return of the result. The value is being stored in the field, but gets truncated by access to help with "performance". I have reviewed multiple forums and SO posts to no avail. Problems listed at link do not apply, Aggregation, Uniqueness, Union, Format Property, Row Source What is wrong with my query? Instructions field in the Customer table is the one that is getting truncated. Here is the raw query generated by access: SELECT

Long Text Field over 255 Characters gets truncated

别等时光非礼了梦想. 提交于 2019-12-25 07:42:36
问题 Not sure why my field in my query is getting truncated upon the return of the result. The value is being stored in the field, but gets truncated by access to help with "performance". I have reviewed multiple forums and SO posts to no avail. Problems listed at link do not apply, Aggregation, Uniqueness, Union, Format Property, Row Source What is wrong with my query? Instructions field in the Customer table is the one that is getting truncated. Here is the raw query generated by access: SELECT

Clarification on splitting an Access Database

雨燕双飞 提交于 2019-12-25 07:36:04
问题 I've read multiple articles and watched videos but this is a big change to the structure so I want to confirm the idea that I have. Splitting will separate the tables and forms/queries into separate files. I get that much. But two questions. 1) Should I backup my database beforehand? 2) Can I edit the forms in design/layout view while they're being used by, say, a data entry team? The issue I'm running into now is that I created a simplistic front end for another team to use but I now need to

can't build a link between unbound forms

被刻印的时光 ゝ 提交于 2019-12-25 07:29:38
问题 I have two tables in my database, Person and Action . Person has a one-to-many relationship with Action . I'm trying to build a Main form that has a Person form and an Action form on it, so that when an entry for Person is clicked on, the corresponding entries in Action show up in the Action subform. But when I view Main in Design mode, and click 'Link Master Fields' in the properties for the Action subform, I get this error message: Can't build a link between unbound forms. How can I set up

Trying to connect a comboBox in word to a database in Access using Visual Basic

三世轮回 提交于 2019-12-25 07:28:48
问题 I've been working on this for the past 6 hours and I'm getting a frustrating error. For now, I want to add a combo box into my blank word document and populate it with a data from a field in a table I created in Access. I'm using Visual Studio 2015 as my IDE and the Word 2013 Document Template. ERROR An exception of type 'System.Runtime.InteropServices.COMException' occurred in WordInvoice.dll but was not handled in user code Additional information: Provider cannot be found. It may not be