ms-access

MS Access + ODBC 8.0 + MySQL some field show first 10 rows =0, though MySQL shows other values

ぐ巨炮叔叔 提交于 2020-01-16 08:41:09
问题 FEATURES: MS ACCESS 2010 + ODBC conector + MySQL server PROBLEM: All fields with datatype INT in first 10 rows show 0 (zero) values. If I short asc or desc still first 10 rows with INT = 0. When I trying to edit that records, sometimes I get "The data has been changed", but sometimes when update some field in these records, real value appears. Until I close and open that table, than value again become 0 I workaround all day to find solution, but I cant handle this problem. I have more than 10

Access Update with Visual Basic SQL

谁说我不能喝 提交于 2020-01-16 07:39:27
问题 Ok, Firstly Hey. Technically i am new to this site, however i have been using it as a resource for a few years, and it is only because i am stumped that i now come in need of your aid. I have a VB script that is Querying the Db, filling the intended boxes with the string and displaying it. My issue is that when i try to use the Update SQL command, it completes however it does not update the DB when i manually check. Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet

Unrecognized database format to other PC

时光总嘲笑我的痴心妄想 提交于 2020-01-16 06:45:19
问题 I can't find the solution to my problem. So I asked. con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source = " & Path.Combine(Application.StartupPath, "piglets.accdb") I was using Access 2010. It was working fine, with me and other PC's. Then I needed to change my database, it was given to me as a working sample from SO. piglets.accdb - This is 2010 too, I think. I opened it, worked fine, incorporated it to my newly created app, with the same exact code. It was working with me

Microsoft Access 2007, Macro issue, form and database with phone numbers

我是研究僧i 提交于 2020-01-16 05:28:07
问题 I'm trying to write a little form which accepts some user input, and on the basis of some logic displays one of two possible other forms. Everything is working fine if I use simple, unformatted data, but I hit a problem if the data in question has an input mask of a phone number. Presumably there's a trick here to ignore formatting characters or some such? The actual logic looks for records in a particular table whose values match the data entered. Something like this cut down example: A form

I have a syntax error in my insert into statement

一曲冷凌霜 提交于 2020-01-16 04:28:25
问题 I'm using a MS Access database, with the following columns in the Admins table: Column Type ====== ==== Name Text Surname Text Dateadded Date/time Adminnumber Number(long integer) Password Text ID type Autonumber (Not sure if ID is relevant) This is my code but it keeps giving me a syntax error. ADOquery1.Active := false; adoquery1.sql.Text := 'insert into Admins(Name, surname, Adminnumber, Dateadded,password)Values('''+edit11.Text+''', '''+edit12.text+''', '''+edit13.Text+''', '''+edit14

MS Access : Dealing with today's date in calculated field expression

假装没事ソ 提交于 2020-01-16 04:24:08
问题 Hi I am creating a table in MS Access to store the details of children in a school. I have a field called YearGroup which needs to calculate the school year they are in based on their date of birth and whether they have been moved up or down a year. I.e. if the expression deems they are six years old they should be placed in year 2. If they were moved down or up a year they should be in year 1 or 3 (this is based on another field in the table called YearModifier). The code I have at the

Operation must use an updatable query

孤街浪徒 提交于 2020-01-16 04:17:52
问题 I am trying to update a column in one table to set its value to the count of records in another table. This produces the error: Operation must use an updateable query. Query: UPDATE Tracking SET BatchCount = (Select Count(*) from Batch) WHERE ReportingDate=Date(); It seems Access does not like the Select Count(*) from Batch sub-query. If I replace it with a literal value, it works fine. Any suggestions to resolve this issue is much appreciated. 回答1: Unfortunately this is an inherent

Error in my SQL statement (UPSERT)

穿精又带淫゛_ 提交于 2020-01-16 04:08:07
问题 I'm trying to do an UPSERT (since that's what it appears to be called) and I'm getting an error: Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression ... UPDATE myTable SET Field1='10', Field2='11' WHERE Date = #06/05/2013# IF @@ROWCOUNT = 0 BEGIN INSERT INTO myTable (Field1, Field2) VALUES (10, 11) END 回答1: Your code is using T-SQL (SQL Server) syntax that Access SQL does not understand. The VBA equivalent would be: Dim cdb As DAO.Database Set

How do I switch between Access Form and Datasheet views, and remain on the same record, without filtering?

孤街醉人 提交于 2020-01-16 03:56:12
问题 In MS Access 2007, I want to switch between datasheet and form views, without filtering, and remain on the current record. Should I use a bookmark ? How ? or How might I place a button on the ribbon to switch views, without having to search for the record or use a filter. I need this to run Access 2007 Runtime, since it will be implemented on a non-licensed computer. Seems some of the ribbon butttons & groups are not showing even if defined: I tried the "GroupViews" and "ViewsModeMenu"

MS Access Crosstab query with multiple columns?

无人久伴 提交于 2020-01-16 03:37:07
问题 What's the best way to get multiple columns in a crosstab query? I have the following table: ID Name Topic Date 123 John Define 9/30/2015 123 John Measure 10/30/2015 123 John Analyze 11/30/2015 321 Mary Measure 8/28/2015 321 Mary Define 7/15/2015 321 Mary Define 6/15/2015 This is the result I'm looking for: ID Name Define Define Date Measure Measure Date Analyze Analyze Date 123 John 1 9/30/2015 1 10/30/2015 1 11/30/2015 321 Mary 2 7/15/2015 1 8/28/2015 I created a crosstab query to pivot the