ms-access

SQL, combining the result

限于喜欢 提交于 2019-12-29 09:28:13
问题 I am using Access and have this SQL SELECT land.id, land.official_name, vaksiner.vaksiner FROM land INNER JOIN (vaksiner INNER JOIN land_sykdom ON vaksiner.id = land_sykdom.sykdom) ON land.kort = land_sykdom.land ORDER BY land.official_name The SQL gives me a result like this: id official_name vaksiner 1 a A 1 a C 2 b A 2 b B 2 b C But I want to combine the result so that it looks like this: id official_name vaksiner 1 a A, C 2 b A, B, C 回答1: See Allen Browne's ConcatRelated function

Operation must use an updatable query. (Error 3073) Microsoft Access

删除回忆录丶 提交于 2019-12-29 09:12:29
问题 I have written this query: UPDATE tbl_stock1 SET tbl_stock1.weight1 = ( select (b.weight1 - c.weight_in_gram) as temp from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and b.item_submodel_id = tbl_stock1.item_submodel_id and b.status <> 'D' and c.status <> 'D' ), tbl_stock1.qty1 = ( select (b.qty1 - c.qty) as temp1 from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and b.item_submodel_id = tbl_stock1.item_submodel_id

Attempting CREATE VIEW in Access gives “Syntax error in CREATE TABLE statement”

痞子三分冷 提交于 2019-12-29 09:07:24
问题 I typed this code to create a view in a pre created database: CREATE VIEW NHTrips AS SELECT TripID, TripName, StartLocation, State, Distance, MaxGrpSize, Type, Season FROM Trip WHERE State = 'NH' ; When I try to run Access(2007) responds with a an error message: "Syntax error in CREATE TABLE statement." Why? 回答1: Access supports CREATE VIEW when you execute it from ADO/OleDb. This code snippet works because CurrentProject.Connection is an ADO object ... Dim strSql As String strSql = "CREATE

Attempting CREATE VIEW in Access gives “Syntax error in CREATE TABLE statement”

穿精又带淫゛_ 提交于 2019-12-29 09:07:06
问题 I typed this code to create a view in a pre created database: CREATE VIEW NHTrips AS SELECT TripID, TripName, StartLocation, State, Distance, MaxGrpSize, Type, Season FROM Trip WHERE State = 'NH' ; When I try to run Access(2007) responds with a an error message: "Syntax error in CREATE TABLE statement." Why? 回答1: Access supports CREATE VIEW when you execute it from ADO/OleDb. This code snippet works because CurrentProject.Connection is an ADO object ... Dim strSql As String strSql = "CREATE

Columns to Rows in MS Access

大憨熊 提交于 2019-12-29 08:59:07
问题 I am trying to create a query in MS Access to ultimately take the output from this: Name Cat 1 Cat 2 Cat 3 Cat 4 Cat 5 Cat 6 Joe 2 12 10 1 0 0 Bob 0 0 0 0 0 0 Jody 2 4 3 1 2 0 Harry 0 4 14 0 2 0 To something like this: Name Joe Bob Jody Harry Cat 1 2 0 2 0 Cat 2 12 0 4 4 Cat 3 10 0 3 14 Is this even possible? EDIT SELECT [Authorizer Name], Sum([Q1A - CD # 1]) AS [Category 1], Sum([Q2A- CD # 2A] + [Q8A- CD # 2A] + [Q10A- CD # 2A] + [CTS A accurate- CD # 2A] + [e-correspondence A accurate- CD #

Passing Query Parameter to Sub-Report

你说的曾经没有我的故事 提交于 2019-12-29 08:54:08
问题 It has been a long time since I have worked with MS Access and am not sure if I am doing this right. I have a Report bound to a query of single list of user names. The report groups on the user name and has a sub-report in the detail that is a chart. The sub-report/chart is based on a query that accepts a parameter of the user name. Since the sub report is not bound I need to pass the user name parameter from the main report detail onload event down to the sub-report and thus into the

How to query MS Access database with C# application?

烈酒焚心 提交于 2019-12-29 08:51:33
问题 I have an application that uses Microsoft.Office.Interop.Excel to pull data from an Excel workbook. The information in the Excel workbook has been moved to an Access database, and I have been tasked to update the application, so that it will look for the data in the database. I found the Microsoft.Office.Interop.Access reference, but how do I use it to open the database and run queries? The documentation on this on MSDN seems to be somewhat lacking. Maybe I'm looking in the wrong place... :\

JDBC with ms-access?

三世轮回 提交于 2019-12-29 08:23:26
问题 How to connect to a Microsoft Access-based database in a Windows using JDBC code? What syntax is to be written for Type-1 and Type-4 types of the drivers? Class.forName(" "); Is the above syntax different for everytype of the driver we use? How can we define and identify the type of the driver we use?? If possible then also specify for the oracle also the driver syntax to be loaded.. 回答1: You can use JDBC-ODBC bridge by calling: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") Then you can use

Develop MS Access 2016 AddIn (Ribbon / VSTO) with Visual Studio 2015

我的未来我决定 提交于 2019-12-29 08:21:17
问题 Hope you can help me. I am looking forward to programming my first MS Access AddIn with Visual Studio 2015 (a Ribbon-Bar as VSTO), but not having started I have to stop already. Visual Studio provides templates for almost every office product, but MS Access. I heard it is possible to "change" for example the Excel VSTO-Template so it can be used to develop an MS Access Ribbon. Does anyone know a good instruction how to handle this? How are you developing VSTO for MS Access? Thanks for your

Check if MS Access 2010 is installed

孤街醉人 提交于 2019-12-29 08:12:34
问题 I am maintaining an application which currently checks to see whether MS Access 2007 is installed. It does this by verifying that a registry key exists. public bool IsAccess2007Installed() { RegistryKey rootKey = Registry.ClassesRoot.OpenSubKey(@"Access.Application.12\shell\open\command", false); return rootKey != null; } How would I go about verifying whether MS Access 2010 is installed? Or better yet, how would I verify that MS Access 2007 or later is installed? It is assumed that the user