ms-access

replace text in code module

六月ゝ 毕业季﹏ 提交于 2021-01-28 05:33:28
问题 Im trying to use the replaceline function to update code in Access VBA module. it keeps coming up with a compile error. Ive checked that the VBA Extension are selected and compared it to other examples that I have looked up. this is the first time that Ive used this type of function, so I haven't fully got my head around them. code below Sub ReplaceCodeModuleText(strModule As String, strFindWhat As String, strReplaceWith As String) 'FUNCTION: ' Search the code module for specific text '

Word Fill VBA in MS Access for various fields in table

前提是你 提交于 2021-01-28 05:10:16
问题 For our incident management side of our database I am trying to have data from fields in my table(s) generate within the 149 Investigative Report, a Word document template provided by the state (see link here). I made a read-only version of the document to preserve its integrity by forcing a save as by the user and loaded it with text form fields with bookmarks to reference (example: txtcaseintroduction ). I modified code I found in the internet for working with form fields and assigned it to

Case sensitive searching in MS Access

跟風遠走 提交于 2021-01-28 05:04:20
问题 I have a query which searches rows in a database for matching strings. An example row may be: This is a row which contains a String The query that I am currently running is syntactically identical to SELECT table.column FROM table WHERE table.column LIKE "*String*" although it returns every row where the text "string" is found, regardless of case. Does MS Access 2010 have any sort of case sensitive string comparator that I should be using instead of this? 回答1: You will have to resort to VBA

Access Autonumber and Maintaining Uniqueness in Multi-user Database

不问归期 提交于 2021-01-28 04:02:15
问题 Somewhat general question about Access, but hopefully has a fairly easy answer: When you use autonumber in a shared multi-user database, is Access doing anything in particular to ensure that the number it assigns is unique what with other users adding records at the same time? Does it immediately claim the next number for the first user who has connected to that table, or does it wait until the new record is about to be saved and check the highest number of all saved records in the table just

SELECT without FROM Clause

和自甴很熟 提交于 2021-01-28 03:11:38
问题 I'm writing a SQL statement for my MS Access database, and the purpose is to count values from 3 different queries, so I tried this way: SELECT(query1 + query2 + query3) AS Qtd Each query returns an unique value from an aggregate function count, i.e, query1 = SELECT Count(something) FROM Table WHERE... Everything should work fine, but MS Access demands a FROM clause. When I put a table in that query (not changing the SELECT statement above), I end up with tones of rows and each row the result

SELECT without FROM Clause

馋奶兔 提交于 2021-01-28 01:08:49
问题 I'm writing a SQL statement for my MS Access database, and the purpose is to count values from 3 different queries, so I tried this way: SELECT(query1 + query2 + query3) AS Qtd Each query returns an unique value from an aggregate function count, i.e, query1 = SELECT Count(something) FROM Table WHERE... Everything should work fine, but MS Access demands a FROM clause. When I put a table in that query (not changing the SELECT statement above), I end up with tones of rows and each row the result

MS Access - Add OLE objects to table with VBA

余生长醉 提交于 2021-01-28 00:40:18
问题 I am using Access 2016 and Office 2016. I have a form named "frmFiles". On that form I have a bound object frame named "FileOLE" and a button named "Command2". I have a table named "tblFiles" with 2 fields in it. One named "ID" (AutoNumber/Primary key) and a second named "File" (OLE Object). My form's RecordSource is linked to my table, and my bound object frame control's ControlSource to my table's "File" field. My goal is to append the same Excel worksheet to my table each time I click the

How do you do a crosstab query in Access with a fixed amount of columns

白昼怎懂夜的黑 提交于 2021-01-27 20:35:16
问题 I want to pull data with an MS Access crosstab query so I can bind it to a report. When I load the page I get a Run-time error'3637': Cannot use the crosstab of a non-fixed column as a subquery. I would like a way to get back a fixed grid when I run the query and if the cell is null display a zero. 回答1: Subquery? That's one of my weaknesses when it comes to Access so I can't help you there. I'd suggest posting the SQL of the query though so others can take a look. Also what happens when you

MS Access 2019 - SQL Server 2017 - Recordset cannot be updated

耗尽温柔 提交于 2021-01-27 19:30:14
问题 I've created a table in a SQL Server 2017 database. Then I've created a form in MS Access 2019 that use an ADO Object as "record source". On the form, there is a Textbox with the controlsource property=Field. Then, when I open the form, everything works as expected (the content of Field shows up in the Textbox, I can move the cursor backwards and forwards and so on) except for one thing: It's not possible to change, add or delete records. Create a table On SQL Server (use SSMS): CREATE TABLE

Exporting Access Table into XML using VBA

自闭症网瘾萝莉.ら 提交于 2021-01-27 19:10:27
问题 I have an Access Table that was originally imported from XML. When I export it I do not have the same XML structure as the original XML table. The original imported table looks as follows: <?xml version="1.0" standalone="true"?> <profiling> <program> <name>118CDSpro</name> <p1on>1</p1on> <p1tool>36</p1tool> <p2on>OFF</p2on> <cut>OFF</cut> <rule>OFF</rule> <desc>118 Clad DirectSet Profile</desc> <pic>akv.bmp</pic> <ten>dilec_F</ten> </program> <profiling/> This is what I get in an export: <