ms-access

MSAccess - Exclusion Join w/Wildcard?

泄露秘密 提交于 2020-01-15 11:25:14
问题 I had good success (MSAccess - Query using a Table as Criteria) joining a Contacts table when Title matches a substring contained in an Include table using: SELECT Contacts.Title FROM Contacts INNER JOIN Include ON Contacts.Title like '*' & Include.String & '*'; I think I now need to go further and Exclude some titles, using an Exclude table. Examples: The above approach properly grabbed the "CEO", but also grabbed the "CEO Admin Assistant", which I do not want. The following is returning all

Trying to use VBA variable in Access UPDATE Statement

隐身守侯 提交于 2020-01-15 11:11:43
问题 So as the title says I am trying to use a VBA variable within an update statement. This is being used because I want to loop through each cell in a range and subtract a value from the worksheet from a value within the table corresponding to that iterations cell reference. However, statement runs an error saying "too many parentheses." However, this is odd to me b/c I pulled the SQL syntax directly out of access. I guess I am missing something? I will post both versions of the code: Code with

Trying to use VBA variable in Access UPDATE Statement

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-15 11:07:33
问题 So as the title says I am trying to use a VBA variable within an update statement. This is being used because I want to loop through each cell in a range and subtract a value from the worksheet from a value within the table corresponding to that iterations cell reference. However, statement runs an error saying "too many parentheses." However, this is odd to me b/c I pulled the SQL syntax directly out of access. I guess I am missing something? I will post both versions of the code: Code with

JDBC and MS-Access problem

做~自己de王妃 提交于 2020-01-15 10:52:25
问题 I'm trying to connect to an MSAccess database and retrieve some data. With simple examples all runs well but if i'm going to use some where clauses i get no data. This example is ok: PreparedStatement stm = con.prepareStatement("SELECT A.* FROM A"); ResultSet rs = stm.executeQuery(); rs.next(); The next example get no rows: PreparedStatement stm = con.prepareStatement("SELECT A.* FROM A WHERE (((A.Name) LIKE ?))"); stm.setString(1,"*"); ResultSet rs = stm.executeQuery(); rs.next(); I don't

12 month moving average by person, date

岁酱吖の 提交于 2020-01-15 10:48:27
问题 I have a table [production] that contains the following structure: rep (char(10)) ,cyc_date (datetime) ---- already standardized to mm/01/yyyy ,amt (decimal) I have data for each rep from 1/1/2011 to 8/1/2013. What I want to be able to do is create a 12 month moving average beginning 1/1/2012 for each rep, as follows: rep cyc_dt 12moAvg ------------------------- A 1/1/2012 10000.01 A 2/1/2012 13510.05 . ........ ........ A 8/1/2013 22101.32 B 1/1/2012 98328.22 B ........ ........ where each

Can I Return From The Current Event Stack In Microsoft Access VBA?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 10:46:42
问题 I would like to know if there exists a pre-built system function that would cancel the whole memory stack of the current event being fired, without having to exit every procedure in the stack trace, in Microsoft Access VBA? I am looking for something like the following: Public Sub Procedure2() CancelEvent 'This would return from procedure2, proedure1, and the specific event Sub End Sub Public Sub Procedure1() Procedure2 End Sub Private Sub SomeControl_SomeEvent() Procedure1 End Sub I have

Not able to pull records from access to excel, Probable connection issue

夙愿已清 提交于 2020-01-15 10:20:08
问题 I using the below code to pull records from access to excel. I am getting error at connDB.Open ConnectionString:="Provider = Microsoft.ACE.OLEDB.12.0; data source=" & strDB The error says"invalid sql statement, delete, insert,procedure,selet or update" Kindly help as I am stuck and cannot move forward at all.... please help. Sub automateAccessADO_9() 'Using ADO to Import data from an Access Database Table to an Excel worksheet (your host application). 'refer Image 9a to view the existing

How to create a decimal field in MsAccess using DAO?

五迷三道 提交于 2020-01-15 10:08:28
问题 I need to create a decimal field in MsAccess 2003 through DAO. How do I do that? Other fields I can create using following codesnippet, but not decimal. How do I set type, precision and scale? NOTE : a decimals datatype = 20, but setting a datatype to 20 results in invalid data type Dim db As DAO.Database Dim tbl As TableDef Dim fld As Field Set db = CurrentDb tbl = database.CreateTableDef("Test") fld = tbl.CreateField( .... ) 回答1: You may find this useful: http://allenbrowne.com/ser-49.html#

How to create a decimal field in MsAccess using DAO?

一笑奈何 提交于 2020-01-15 09:58:07
问题 I need to create a decimal field in MsAccess 2003 through DAO. How do I do that? Other fields I can create using following codesnippet, but not decimal. How do I set type, precision and scale? NOTE : a decimals datatype = 20, but setting a datatype to 20 results in invalid data type Dim db As DAO.Database Dim tbl As TableDef Dim fld As Field Set db = CurrentDb tbl = database.CreateTableDef("Test") fld = tbl.CreateField( .... ) 回答1: You may find this useful: http://allenbrowne.com/ser-49.html#

How to use webcam capture on a Microsoft Access form

馋奶兔 提交于 2020-01-15 09:48:12
问题 I'm currently trying to design a database in Microsoft Access 2013 to store records of faulty parts found in the plant. I'm trying to implement a button on my form where the user can click on it to access their device's camera to attach a picture of the fault in the form. The user would be using Windows 10 on a Dell latitude 5290 two in one (If that helps.) I tried using a code I found online but it is extremely old and I don't believe would work in this age. Regardless, here is the code-