ms-access

How to generate a new MS access file programmatically

痞子三分冷 提交于 2021-02-18 07:50:30
问题 I have looked far and wide, in the deepest darkest corners of the internet, but for the life of me, I can not find the correct way to open a NEW Access file and then using vb.net to write data in the database.. The keywords here are NEW database, I don't want to open an existing file. Is this even possible? Thanks in advance! 回答1: I have finally found the way, thanks to a co-worker of mine Neither ADO.NET nor ActiveX Data Object (ADO) provides the means to create Microsoft Access Database.

Access VBA code in report gives the same result for each row

随声附和 提交于 2021-02-17 05:53:45
问题 This is my report: I have coded in VBA so that the 3rd column (texbox) shows the ID related to each MinDeNote . But it just shows 3 for all row. 3 is the ID of the first product, not all of them. How could I do to make a loop? Thanks ! This is my code: Me!Texte7 = DLookup("F_Code", "Query", "Note = """ & [MinDeNoteBox] & """") The outcome is gonna be different for each row, which is not the case now. 来源: https://stackoverflow.com/questions/65658180/access-vba-code-in-report-gives-the-same

Summing up Hours and Minutes in MS Access - How to deal with huge datasets

荒凉一梦 提交于 2021-02-17 05:27:47
问题 So I have a Table in MS Access 2010 which looks like this: Date Pers. ID Dauer Tätigkeit 10.04.2016 10 01:15 11.05.2016 5 05:00 ... I want to get the total hours of "Dauer Tätigkeit". All entries in the "Dauer Tätigkeit" are in the Date Format. The formula below is supposed to do the job for listing the end in a Format like '1346:30'. It actually does the job for small datasets. The dataset I have to work with though has around 800 entries with an hourly average of 3 hours. So i am expecting

Natural or Human Sort order

喜你入骨 提交于 2021-02-16 21:56:56
问题 I have been working on this on for months. I just cannot get the natural (True alpha-numeric) results. I am shocked that I cannot get them as I have been able to in RPG since 1992 with EBCDIC . I am looking for any solution in SQL, VBS or simple excel or access. Here is the data I have: 299-8, 3410L-87, 3410L-88, 420-A20, 420-A21, 420A-40, 4357-3, AN3H10A, K117GM-8, K129-1, K129-15, K271B-200L, K271B-38L, K271D-200EL, KD1051, KD1062, KD1092, KD1108, KD1108, M8000-3, MS24665-1, SK271B-200L,

import text file to Access 2003 database using Python

故事扮演 提交于 2021-02-16 21:22:36
问题 I'm trying to import a pipe delimited text file into an access database with an existing table using a Python 3.4 application I'm working on, but I'm having some trouble. The application will be used to import different text files so I'm using an entry widget to write in the filename and I want the contents of the file entered to be loaded into my table. I tried loading the file into the able just using access and it worked fine so the formatting should be good. Below is some of the code I've

Using VB.NET to obtain macros in MS Access

独自空忆成欢 提交于 2021-02-16 20:46:06
问题 I'm trying to create a VB.NET button which will connect to an MS Access database and obtain a list of all the macros stored in the access database. After I have the list I want to display the values in a combobox. I've found something online similar to what i'm trying to do but I cannot find anything which will just give me a list of macros. Dim userTables As DataTable = Nothing Dim connection As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection() Dim source As String

Import .DBF file in MS Access after button press, Using VBA

ⅰ亾dé卋堺 提交于 2021-02-16 18:37:20
问题 I have to import .DBF file int MS Access Table On button click. The file name is SourceTable.dbf ; Access database is StudentDataBase.accdb and the table I want to insert it is named myTable. First I want to ask: do I need to have the same fields in the table or it can just be a blank table. I have the following sample code: DoCmd.TransferDatabase transfertype = acImport, databasetype = "dBase III", DatabaseName = "C:/SourceTable.dbf", objecttype = acTable, Source = "SourceTable", destination

Import .DBF file in MS Access after button press, Using VBA

 ̄綄美尐妖づ 提交于 2021-02-16 18:37:13
问题 I have to import .DBF file int MS Access Table On button click. The file name is SourceTable.dbf ; Access database is StudentDataBase.accdb and the table I want to insert it is named myTable. First I want to ask: do I need to have the same fields in the table or it can just be a blank table. I have the following sample code: DoCmd.TransferDatabase transfertype = acImport, databasetype = "dBase III", DatabaseName = "C:/SourceTable.dbf", objecttype = acTable, Source = "SourceTable", destination

Populate textbox based on combobox selection

笑着哭i 提交于 2021-02-16 14:49:27
问题 I am looking to update a textbox based on a combo box selection. For example: If someone selects the word "Beach Holiday" from the drop down, then the text box will automatically populate with the word "Spain" How do I do that? I know I can do something similar to: me.textbox = me.combo.column(1) but that's not exactly what I am trying to do. Thanks in advance 回答1: Configure your ComboBox to have two columns, with the width of the second column set to 0 so that it is not displayed. Then, set

Open Visio Drawing using a Macro in Access 2010

大憨熊 提交于 2021-02-16 14:46:30
问题 I have a button on a form in my database that i would like to open a user guide on click. The user guide I have put to gether is in visio but i can't seem to find a way to open it using the macro builder. Is this something i would need to do using VBA? If so any suggestions on how the code should look? 回答1: I think something like the following may work, I have manipulated this to fit visio though, so hopefully it works. Dim FName As String Dim VisioApp As Object On Error Resume Next Set