ms-access

MS Access equivalent of FOR XML PATH in T-SQL to list related values [duplicate]

萝らか妹 提交于 2021-02-07 10:21:50
问题 This question already has answers here : Combine rows / concatenate rows (5 answers) Combine values from related rows into a single concatenated string value (1 answer) Closed 7 years ago . I Have a table as follows in access: MatterNO Description Amount FL069509 SMS R 50.00 FL069509 Call R 52.00 FL069509 Summons R 52.00 FL069509 Email R 5 420.00 FL069509 Letter R 0.12 NA076353" SMs R 123.10 NA076353" call R 0.53 NA076353" summons R 53.00 NA076353" email R 453.00 NA076353" letter R 4 530.00

Access Data Project Error

非 Y 不嫁゛ 提交于 2021-02-07 09:47:36
问题 I have a Access Data Project that connects to an SQL server database. Recently I modified the structure of the database from the SQL server. Now whenever I try to open one of the tables, I get the following error. Microsoft Office Access can't find the object 'SELECT *, sql_variant_property(value, 'basetype') AS type FROM ::fn_listextendedproperty(N'MS_DisplayViewsOnSharePointSite',N'user',N'dbo',N'table',N'Hardware',NULL,NULL)'. You misspelled the object name. Check for missing underscores (

How can I investigate and resolve an (apparent) Access database corruption?

允我心安 提交于 2021-02-07 06:06:24
问题 I have an Microsoft Access 2010 database application with split front end and backend which has started to behave oddly, and I've exhausted all the options I know for investigating and resolving the problem. 32-bit Access 2010 running on Windows 8.1... I have both Access 2010 and Access 2013 installed, but the problem also manifests itself on a Windows 8.1 system with a completely fresh install of Access 2010 and no Office 2013 present. The issue also exists if the application is run using

Insert picture into Excel and keep aspect ratio without exceeding dimensions with VBA

限于喜欢 提交于 2021-02-07 03:30:56
问题 I am exporting data from an Access database into an Excel report, and part of what needs to be included in the report are pictures corresponding to the data. The pictures are stored in a shared file and are inserted into the Excel file like so: Dim P As Object Dim xlApp As Excel.Application Dim WB As Workbook Set xlApp = New Excel.Application With xlApp .Visible = False .DisplayAlerts = False End With Set WB = xlApp.Workbooks.Open(FilePath, , True) Set P = xlApp.Sheets(1).Pictures.Insert

How to create a new column in a select query

我与影子孤独终老i 提交于 2021-02-06 09:42:57
问题 In MS Access, I want to insert a new column into the returned result of a select query. The new column has the same value for every row. For example, my select returns columns A, B and I want C to be the new column created by the select query: A B C ---------- a1 b1 c a2 b2 c a3 b3 c 回答1: select A, B, 'c' as C from MyTable 回答2: SELECT field1, field2, 'example' AS newfield FROM TABLE1 This will add a column called "newfield" to the output, and its value will always be "example". 回答3: It

How to create a new column in a select query

假如想象 提交于 2021-02-06 09:41:16
问题 In MS Access, I want to insert a new column into the returned result of a select query. The new column has the same value for every row. For example, my select returns columns A, B and I want C to be the new column created by the select query: A B C ---------- a1 b1 c a2 b2 c a3 b3 c 回答1: select A, B, 'c' as C from MyTable 回答2: SELECT field1, field2, 'example' AS newfield FROM TABLE1 This will add a column called "newfield" to the output, and its value will always be "example". 回答3: It

How to connect UCanAccess to an Access database encrypted with a database password?

百般思念 提交于 2021-02-06 09:31:06
问题 I've developed a Java application (a dictionary) with an Access database to store the words of the dictionary and I'm getting ready to distribute it. I want to encrypt my database with a password to prevent people to access my words. When I set a passwords the Java code shows this Exception net.ucanaccess.jdbc.UcanaccessSQLException: Decoding not supported. Please choose a CodecProvider which supports reading the current database encoding. at net.ucanaccess.jdbc.UcanaccessDriver.connect

How to remove duplicate rows and keep one in an Access database?

有些话、适合烂在心里 提交于 2021-02-05 11:23:43
问题 I need to remove duplicate rows in my Access database, does anyone have generic query to do this? As I have this problem with multiple tables 回答1: There are two things you need to do, Determine what the criteria are for a unique record - what is the list of columns where two, or more, records would be considered duplicates, e.g. JobbID and HisGuid Decide what you want to do with the duplicate records - do you want to hard delete them, or set the IsDeleted flag that you have on the table Once

Access VBA: using `do while` loop to update a recordset

一世执手 提交于 2021-02-05 11:22:15
问题 I would like to get a result using a do while loop. However, my result gives only one record... What I'm trying to do is: Move through rs (record-set) records Check if a value in rs is equal to rs2 If so, copy the username from rs to rs2 Move to the next record Do While Not rs.BOF ' No of records in rs Do While Not rs2.EOF ' No of records in rs2 If Trim(rs2![pic_no]) = Trim(rs![pic]) Then rs![UserID] = rs2![NEW_USER] rs2.MoveNext rs.Update Else rs2.MoveNext rs.Update End If Loop rs

How to concatenate multiple rows in Access involving a Link?

筅森魡賤 提交于 2021-02-05 10:49:06
问题 I have the following problem concerning my Access Database: I have 3 tables which are tblComponents, tblErrors, and linkComponentsErrors. This is a many to many relationships which means one component can have many errors and one error can have many components. These a are linked with their primaryKey (tblComponents.componentID and tblErrors.errorID) in the linkComponentsErrors. Both tables also have a field for their name tblComponents / tblErrors / linkComponentsErrors |compID|compname|