ms-access

Setting the Record Source of a subform in Access

China☆狼群 提交于 2020-02-25 04:20:09
问题 Dim newRS newRS = "SELECT DISTINCT [Grp_ID], [Group_Name], [Group_NPI] FROM [GROUP]" Forms!loclistingfrm!LocationListSubFrm.RecordSource = newRS When I look at the LocationListSubFrm sub form in Design View, there is no Record Source property. However, when I access it directly from the objects pane I can see it. Is the fact that it's a subform preventing me from changing the record source? The same subform is recycled throughout my application, so I can't really edit it at the source. 回答1:

Why does this query require a parameter?

℡╲_俬逩灬. 提交于 2020-02-23 10:27:26
问题 I have the following SQL query in MS Access. I'm trying to order the output by the results of an expression contained in the column labeled as 'Response'. My problem is that when I run the query Access prompts me to enter a parameter value for Response. I tried entering zero and one to see what would happen. The query runs in those cases but the sort order is wrong. Can someone please explain to me why this query would require a parameter? Am I doing something wrong? SELECT Market, Sum(Calls)

Close all VBE windows (MS Access, VB for Aplications) [closed]

房东的猫 提交于 2020-02-23 08:34:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 22 days ago . If you are like me and you work with lots of code you probably hate to close all open VBE code windows one by one. There is no functionality in VBE which would do it. How to do it? 回答1: I was looking for a duplicate for this question. I couldn't fine one. So I ended up at Nee a

Connection from Access to R via DBI

僤鯓⒐⒋嵵緔 提交于 2020-02-21 12:05:48
问题 I am looking to analyse data in R (using dplyr) contained in an Access database on my laptop. (My first time trying to set up a database connection in R.) Looking at the tidyverse site, for dplyr to work on the Access data, it seems that the connection must be via the DBI package (rather than RODBC). I'm struggling with the syntax of dbConnect. My code for RODBC was base1<-odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=[filepath]/AdventureWorks DW 2012.accdb") My

Connection from Access to R via DBI

限于喜欢 提交于 2020-02-21 11:51:44
问题 I am looking to analyse data in R (using dplyr) contained in an Access database on my laptop. (My first time trying to set up a database connection in R.) Looking at the tidyverse site, for dplyr to work on the Access data, it seems that the connection must be via the DBI package (rather than RODBC). I'm struggling with the syntax of dbConnect. My code for RODBC was base1<-odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=[filepath]/AdventureWorks DW 2012.accdb") My

Access 2003: count(*) produces syntax error

蓝咒 提交于 2020-02-16 12:21:28
问题 I am using ms-access and for some reason, the code here produces a Syntax error which I dont understand. UPDATE Korrekturentlastung SET Schueler = SELECT COUNT(*) FROM Korrekturentlastung WHERE Korrekturentlastung_Kurs.Kuerzel = Korrekturentlastung.Kuerzel AND Korrekturentlastung_Kurs.Klasse = Korrekturentlastung.Klasse AND Korrekturentlastung_Kurs.Fach = Korrekturentlastung.Fach AND Korrekturentlastung_Kurs.Kursart = Korrekturentlastung.Kursart The error is: Syntax error. in query expression

VB.Net - How can I check if a primary key exists in an Access DB

陌路散爱 提交于 2020-02-08 07:26:02
问题 I want to check in an Access Database if a primary key exists using VB.Net & OleDb: By primary key name By number of fields as primary keys 回答1: From here: Public Shared Function getKeyNames(tableName As [String], conn As DbConnection) As List(Of String) Dim returnList = New List(Of String)() Dim mySchema As DataTable = TryCast(conn, OleDbConnection).GetOleDbSchemaTable(OleDbSchemaGuid.Primary_Keys, New [Object]() {Nothing, Nothing, tableName}) ' following is a lengthy form of the number '3'

Calculated Field Using Data From Another Table

风格不统一 提交于 2020-02-08 05:37:05
问题 I have a table set up that needs to have a field that calculates the price of an order. To do so, I have a 3-letter code set up for each item, but the price of these items isn't included in that table, but another table. To calculate the price, I need to multiply the quantity of the item by the price of the item. So basically, how do I associate the 3-letter code with the price of the item in the other table. The 3 letter code field is also included in the table with the price of the item 回答1

Access query not working?

穿精又带淫゛_ 提交于 2020-02-08 05:17:45
问题 I remember using a query like this which worked for me before. But now its giving me a compile error. I am trying to get only the first 3 characters of the second field. select field1, left(field2, 3) from table1; What am I doing wrong? 回答1: There is nothing wrong with your SQL statement. Brackets around field name, semicolon at end of statement, fewer than 3 characters in field2 --- those are all non-issues here. There is something wrong with your database or your machine and/or its Access

Access query not working?

我的梦境 提交于 2020-02-08 05:17:12
问题 I remember using a query like this which worked for me before. But now its giving me a compile error. I am trying to get only the first 3 characters of the second field. select field1, left(field2, 3) from table1; What am I doing wrong? 回答1: There is nothing wrong with your SQL statement. Brackets around field name, semicolon at end of statement, fewer than 3 characters in field2 --- those are all non-issues here. There is something wrong with your database or your machine and/or its Access