ms-access-2010

My application cannot update Access database after deployment to “C:\\Program Files\\…”

Deadly 提交于 2019-11-27 16:18:31
I have deployed my application to be ready for use by another user (another computer), but when I try to add the data to the database I get the error Operation must use an updatable query The error is like this (This is when I already deployed my program and run under application, not under Visual Studio): But it works perfectly under visual studio, the image like this (note that, the error on the image above appear once I click the submit button, it supposed to stored in the database, and display it on the datagridview as like image below): And also I got another problem, the delete function

CONCAT equivalent in MS Access

孤街醉人 提交于 2019-11-27 14:51:06
I'm doing some work in MS Access and I need to append a prefix to a bunch of fields, I know SQL but it doesn't quite seem to work the same in Access Basically I need this translated to a command that will work in access: UPDATE myTable SET [My Column] = CONCAT ("Prefix ", [My Column]) WHERE [Different Column]='someValue'; I've searched up and down and can't seem to find a simple translation. UPDATE myTable SET [My Column] = "Prefix " & [My Column] WHERE [Different Column]='someValue'; As far as I am aware there is no CONCAT There are two concatenation operators available in Access: + ; and & .

UrlDownloadToFile in Access 2010 - Sub or Function not Defined

半城伤御伤魂 提交于 2019-11-27 09:39:11
I am trying to use the function URLDownloadToFile in Access 2010 VBA code. When i run the code it tells me that URLDownloadToFile is not defined. I have read that this function is in the urlmon.dll which i DO have on my computer. I tried to click the references button in the code editor and load it but it would not let me do so. How can I fix this so I can use the function? Or is there another function that will allow me to download a url to to a file? You'll need to declare this WinAPI function in order to call it from procedures in your code. From HERE Private Declare Function

Top n records per group sql in access

99封情书 提交于 2019-11-27 09:22:45
I am making some software that tracks the scores of a test. There are multiple users, the details of which are stored in a user table. There is then a progress table which tracks a score with the date and the user who's score it is. I can already select the 3 most recent records for a chosen userID SELECT TOP 3 Progress.LoginID, Progress.Score, Progress.[Date Taken] FROM Progress WHERE (((Progress.LoginID)=[Enter LoginID:])) ORDER BY Progress.[Date Taken] DESC; And I can show all the records grouped by LoginID SELECT Progress.LoginID, Progress.Score, Progress.[Date Taken] FROM Progress GROUP

calculating age in years and months in Microsoft Access (2010)

跟風遠走 提交于 2019-11-27 08:37:35
问题 I have two fields (Date of Physical Exam and Date of Birth). I calculated the age in years((Date of Physical Exam- Date of Birth)/365.25). What I want to do is calculate age in years and months in separate field. I am not sure if it can be done using code builder or some way. 回答1: While the DateDiff() function seems like the logical choice for calculating ages, it unfortunately does not calculate the number of full years or months that have elapsed between two dates. For example, say that a

MS Access: Ignoring query criteria if blank

旧城冷巷雨未停 提交于 2019-11-27 08:30:43
问题 I have a form in Access where I run a query based on several text boxes. I apply criteria on several of the query fields that is pulled from the text boxes but would like the query to ignore the criteria when the text box is blank. For example, if the Machine_TextBox is blank, do not apply criteria to the Events.Machine field. SQL code is: SELECT Events.Machine, Events.[Event Date], Events.[Event Description], Events.[Action Taken], Events.[Machine Clinical], Events.[Modalities Not Clinical],

How to set primary key when linking with CreateTableDef

别等时光非礼了梦想. 提交于 2019-11-27 08:01:07
问题 In a MS Access database, I'm connecting to views in a SQL Server database like this: Dim s As String s = "ODBC;DSN=mydb;Trusted_Connection=Yes;DATABASE=mydb;" Dim td As TableDef Set td = CurrentDb.CreateTableDef("vwMyView", 0, "MySchema.vwMyView", s) CurrentDb.TableDefs.Append td CurrentDb.TableDefs.Refresh This creates a linked table, which is linked to a view in SQL Server. However, I cannot insert/update/delete , because Access does not know the "primary key". How can the information about

ClassNotFoundException when trying to connect to .accdb file via JDBC-ODBC in Java 8

狂风中的少年 提交于 2019-11-27 07:13:41
问题 I'm working in a project in Java in Eclipse EE IDE where I have to query a .accdb file. The problem is when I try to load the driver and then connect to the database it gives me an exception error. My code: try{ String filePath = "//myfilepathtomydb/BLABLA/example.accdb" Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + filePath; Connection database = DriverManager.getConnection(url); System.out.println("Connection

Is there an Open File dialog for Access 2010 64bit?

≯℡__Kan透↙ 提交于 2019-11-27 07:09:47
问题 How do I get an Open File dialog for Access 2010 64bit? Normally I would use the common dialog control but that is 32bit and cannot be used with Access 2010 64 bit. 回答1: You can use the built in file dialog. It been there since access 2003. Dim f As FileDialog Set f = Application.FileDialog(msoFileDialogFilePicker) f.Show MsgBox "file choose was " & f.SelectedItems(1) You can late bind if you wish: above needs: Microsoft Office 14.0 Object library If you remove the reference to the 14.0

Why is my .setfocus ignored?

醉酒当歌 提交于 2019-11-27 06:12:23
问题 I have an Access form with a textbox that is meant to allow for repeatedly typing a number, hitting enter, and letting a script do stuff. For speed, the field should keep the focus after DoStuff() is done. However, while I'm sure that DoStuff() is run, the focus always goes to the next field in the tab order. It's like Me.MyFld.SetFocus is being ignored. How do I keep the focus on this field after DoStuff() is done? Private Sub MyFld_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode =