ms-access-2010

OPENDATASOURCE instead of Linked Server

江枫思渺然 提交于 2019-12-06 11:29:05
I have a situation where a linked server to an access DB is crashing my SQL server. Crashed here means adding the linked server causes all other linked servers using that provider to stop working. Any queries to those linked servers hang and don't complete. This situation persists until the server is restarted. However, when I use OPENDATASOURCE to connect to the same data source I don't have this problem. Why would one work and the other crash? The provider I'm using is Microsoft.ACE.OLEDB.12.0. I have Dynamic parameter and Allow inprocess enabled. Example query below select * from

Why can't I connect to my access database

戏子无情 提交于 2019-12-06 11:21:49
问题 I'm creating a Microsoft Access 2010 database that will be part of a small web site for a client. I've debugged it with message boxes and I'm able to accept the data with the VBScript (client's choice as they are willing to update/maintain the web site contents), I'm able to call the sub that sends the data to the database, but I can't get past the connection to the database. Here's what I have: Sub InsertIntoDatabase(FullName) Dim strSQL, strConnect, strSQL2, i Dim conn Set conn =

afterupdate leaves gaps in primary key

喜你入骨 提交于 2019-12-06 10:35:42
I am developing an access database with some forms that are only used for data entry. The problem is that, when I open any of these forms, access creates a new entry in the underlying table, including incrementing the autonumber primary key of the underlying table, and the autonumber remains incremented even if the user opts not to create the record in the database. This means that there are gaps in the sequence of autonumbers in the actual table due to all the times users open and close the form without committing changes. I am using the following code in the beforeupdate method to allow

How can I conditionally format textbox border on continuous form?

别等时光非礼了梦想. 提交于 2019-12-06 07:57:56
In Access 2010, I have a continuous form, and I'd like to change certain properties of a 'cell', like border colour, based on values in another cell. I haven't found a way to do this in VBA, because it's a continuous form and changing the properties directly in VBA changes it for all records, not just the one I'm on. I assume I have to use some form of conditional formatting, but the conditional formatting GUI only allows me to set background colour, basic text formatting, and the Enabled property. How can I set other properties on a control on a continuous form, for specific records only? You

Data macros in Access2010: triggers?

≡放荡痞女 提交于 2019-12-06 04:45:28
问题 I've heard on the grapevine that the forthcoming Access2010 has a Data Macros feature which will for the first time add trigger-like functionality to Access data engine tables. Does anybody have an further details on this? For example, can they created in code (ACEDAO, SQL DDL, etc)? Does the Data Macro run if the data is modified from outside of the Access user interface e.g. via ODBC, OLE DB, etc? 回答1: Ok, a bit more information. Does the Data Macro run if the data is modified from outside

Subform reference throws Error 2455: You entered an expression that has an invalid reference to the property Form/Report

女生的网名这么多〃 提交于 2019-12-06 04:04:57
问题 Yesterday, a form/subform that worked well for me for a long time suddenly started throwing Error 2455: You entered an expression that has an invalid reference to the property Form/Report. Below is my diagnosis of the problem. It feels like a bug. My question is: Have any of you ever seen this? If you are interested, could you try to duplicate the problem, and let me know what you find? The Problem: I had a form that worked perfectly standalone, setting recordsources for each of its subforms

Adding Trusted Location to Access Run Time

廉价感情. 提交于 2019-12-06 02:17:00
问题 I have created a runtime access file, how do I add this file to Trusted Location on my clients PC, where there is No Access Installed. 回答1: Access 2007: [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations] [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\Location(n)] Access 2010: [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations] [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access

Determine if Subform/Subreport Has a Form or a Report Loaded in MS Access

[亡魂溺海] 提交于 2019-12-05 22:38:21
I have a Subform/Subreport control displayed on a Form in an Access 2010 database, and I use it to display both Forms and Reports. I have a few event handlers in which I need to know whether a Report is currently loaded into the Subform/Subreport control, or if it's a Form that's loaded. I have tried all of the following to no avail. Any of the following conditions If IsEmpty(NavigationSubform.Form) Then '... If IsNull(NavigationSubform.Form) Then '... If IsOject(NavigationSubform.Form) Then '... If NavigationSubform.Form Is Nothing Then '... If NavigationSubform.Form Is Null Then '... If Nz

Open a form using ID from a different form in Access 2010 using vba

流过昼夜 提交于 2019-12-05 21:46:19
I am trying to open a form from a button in another form. The form with the button,contracts_all form, has a field ID and I want to open up the form that contains the information with that ID. This second form,contracts, has additional information and has buttons that allow editing of that particular contract. I have managed to get something but it's giving me a 'Run -time error 2489. Form contracts not open' The code is below. Thanks in advance. Private Sub Command74_Click() ID = [Forms]!Contracts_all![ID] DoCmd.GoToRecord acDataForm, "Contracts", ID End Sub Dim Rs As Recordset Dim Test As

Access form linked to disconnected ADODB.Recordset: save changes

∥☆過路亽.° 提交于 2019-12-05 18:22:47
I am trying to set up a form to use a disconnected ADODB.Recordset as its source. The issue I have is that changes are not saved into the original Access table upon closing the form and replying "Yes" to the prompt. What am I missing ? Note: Please don't tell me the method is useless, it's just a POC with a local table, I plan to try later with a more "distant" recordset. Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Private Sub Form_Load() Set conn = New ADODB.Connection conn.Open CurrentProject.Connection Set rs = New ADODB.Recordset With rs rs.CursorLocation = adUseClient rs.Open