ms-access

Create table in Word Document From Access using VBA

泪湿孤枕 提交于 2021-02-11 03:35:34
问题 I am trying to create tables in a Word document template from my Access database. This bit of code runs fine from Word itself and creates tables as required. I was wondering if its possible to run this code from Access and point to a specific word document in which to create the tables. Dim numberOfTables As Integer Dim iCount As Integer numberOfTables = InputBox("How many tables to make?", "Tables") For iCount = 0 To numberOfTables - 1 ActiveDocument.Tables.Add Range:=Selection.Range,

Access Linked to SQL: Wrong data shown for a newly created record

旧巷老猫 提交于 2021-02-10 22:27:13
问题 I'm using tables in Access (2013), that are linked to an SQL database. The primary key is a column 'RowId', containing a GUID. When I'm adding a new record to the table, and I leave the RowId blank. The record is inserted in the SQL database, but then the added record is filled up with data of another record. After investigating the problem with SQL Server Profiler, I discovered that this happens: First, an INSERT statement is processed: exec sp_executesql N'INSERT INTO "{table}" ("{column1}"

Access Linked to SQL: Wrong data shown for a newly created record

江枫思渺然 提交于 2021-02-10 22:21:48
问题 I'm using tables in Access (2013), that are linked to an SQL database. The primary key is a column 'RowId', containing a GUID. When I'm adding a new record to the table, and I leave the RowId blank. The record is inserted in the SQL database, but then the added record is filled up with data of another record. After investigating the problem with SQL Server Profiler, I discovered that this happens: First, an INSERT statement is processed: exec sp_executesql N'INSERT INTO "{table}" ("{column1}"

Azure Data Factory - MS Access as Source Database - Error

有些话、适合烂在心里 提交于 2021-02-10 20:31:03
问题 My source is 'Access Database' Dynamically generating Source query as ' Select * from <tableName> ' But I got field names with spaces in source table, and destination is of type .parquet, Data Factory pipeline is failing with below error Example if Table Employee got a column 'First Name' { "errorCode": "2200", "message": "Failure happened on 'Sink' side. ErrorCode=UserErrorJavaInvocationException,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=An error occurred

How can I convert a string to an actual form label caption in Microsoft Access VBA?

随声附和 提交于 2021-02-10 19:54:23
问题 I have attempted to use array values to loop through different scenarios to dynamically change the caption value of labels in a form. I'm inserting a screenshot of a snippet where I am successful in printing a concatenated value to the Immediate Window. What's in that looks exactly like what I need in my code. However, while i can debug.print these concatenated string values, once I remove the debug.print, everything in my code goes sideways. I'm missing something here, but I've already spent

Access: Canceling Report generation causes error 2501

送分小仙女□ 提交于 2021-02-10 19:51:56
问题 can't believe I am losing so much time on this one. I have an order form, and when I click on a button "reports", a dialog pop ups with a list of different reports to chose from. Double-clicking selects and starts the correspondent report. On one of these reports, there is an unbound text box I need the user to enter data with. The ControlSource of this field is set to its Name property. When the report is started, an input box appears with an OK and a Cancel button. Whenever I enter some

Issues with Access parsing double quotes in a CSV file

一世执手 提交于 2021-02-10 18:34:43
问题 I have a large CSV file that I am trying to import into Microsoft Access but I am running into issues. Assume pipes represent different cells in the database Assume my content is the below. The second entry will only parse the word my with default settings and will not import the word content into the database even though the import wizard implies that it will. The default settings being , delimiter and " text qualifier. |my content is good| |my| Now if i change the text qualifier to NONE it

New record in subform based on ID of main form

僤鯓⒐⒋嵵緔 提交于 2021-02-10 18:27:05
问题 First I want to say that I'm a beginner in Access, and I will appreciate every bit of help I can get. I have created a form showing records from one of my tables with three subforms. The record and the subforms has a one-to-many relationship. I am now creating buttons for each of the subforms for creating new records in the subforms. I've managed to make the buttons and used the Macro builder to open the forms in a dialog mode with Add as data mode. Openform (New recordSub1; Form; ; ; Add;

convert CURL request into VBA xml Object in MS-Access

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-10 18:17:08
问题 I am trying to handle moodle data from our schools MS-Access database using VBA-code to post xml.objects. I implemented the following code from an example for using the RESTful-API into my VBA-code (source https://moodle.org/plugins/webservice_restful): json code: curl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -H 'Authorization: {token}' \ -d'{"options": {"ids":[6]}}' \ "https://localhost/webservice/restful/server.php/core_course_get_courses" This is my

Running Macro from .bat with another Access db open

微笑、不失礼 提交于 2021-02-10 16:23:12
问题 I need to run a few Access macros automatically periodically throughout the day, I do this by scheduling a batch file to open the relevant Access db and run the macro. The problem that I am having is, if I am working on another Access database and therefore already have an instance of Access open, the batch file runs but only opens the database containing the macro that is supposed to run and stops. So the macro doesn't run. Has anyone else had this issue or know how to solve it? The batch