ms-access-2010

Lookup field appears as numerical values instead of text on Access report

元气小坏坏 提交于 2019-12-18 05:00:46
问题 I am trying to create a report putting a field called contact which has the name of a person. This name is linked directly to another table where I keep all the contacts. For some strange reason, when I include this name (which in query view displays as the name of the contact), instead of the name appearing, the unique ID number is shown on my report. 回答1: As mentioned in the article cited in the above comment, you can use a Combo Box control on your report to do the lookup for you. To see

bound and unbound controls in ms access

六眼飞鱼酱① 提交于 2019-12-17 20:14:32
问题 What is the difference between bound and unbound controls in MS Access? How do they differ? And when on an MS Access Form in design view, how can we tell if a form is bound or not? 回答1: Bound elements are linked directly back to the relevant tables, and when you amend any data within form's, your changes are immediately written to the tables. This can often lead to people questioning why "when I close a form does it save the changes?" Well that's bound behaviour for you, and to prevent any

Corrupted Access .accdb file: “Unrecognized Database Format”

旧时模样 提交于 2019-12-17 16:56:30
问题 I'm having a problem. One of my databases on our shared network will not open for any user. It says "Unrecognized Database Format." I've had this problem before but was still able to open the database, compact and repair, or import all of the database objects into a new database. The problem here is -- I can't even get it to the point of opening. Is there a solution here without the use of third party software to repair the database? 回答1: Open access, go to the database tools tab, select

Top n records per group sql in access

帅比萌擦擦* 提交于 2019-12-17 09:55:57
问题 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

MsAccess SQL count days in overlaping periods with some excluding periods

我的未来我决定 提交于 2019-12-14 03:59:25
问题 The Problem : Given a table with periods of time for a given person that may (or may not) overlap and given another table with exclusions, I want to count the number of days for each person and period excluding the overlapping days and also the exclusion periods. As they say an image it's worth 1000 words so: In green are painted the periods In red are painted the excluding periods In blue is painted the solution (expected output, each period is expected to be a row in the final query) so I

Any way to have long text (memo) parameters in DAO and MS Access?

ぃ、小莉子 提交于 2019-12-14 03:47:06
问题 I've searched all over for information on this, and it seems like DAO paramaters in Access are restricted to 255 characters. Really? Still? Even in Office 2010? It seems absurd. I'd prefer not to switch to ADO, but at this point it seems like I'll have to. Is there any way to work around this while still using DAO and VBA code? And are there any methods at all that allow using named parameters in queries that are over 255 characters in length, DAO or otherwise? 回答1: Your choice is dynamic sql

Measuring query processing time in Microsoft Access

隐身守侯 提交于 2019-12-14 03:37:03
问题 I got this code for measuring the time of a query in Access database. Every time I try to run it, I get syntax error and MyTest() line is highlighted. Option Compare Database Option Explicit Private Declare Function timeGetTime _ Lib "winmm.dll" () As Long Private mlngStartTime As Long Private Function ElapsedTime() As Long ElapsedTime = timeGetTime() - mlngStartTime End Function Private Sub StartTime() mlngStartTime = timeGetTime() End Sub Public Function MyTest() Call StartTime DoCmd

Syntax error in query expression

痴心易碎 提交于 2019-12-14 02:32:19
问题 string q = "UPDATE tableAbsensi SET Absen_keluar =('"+(DateTime.Now.ToString("hh:mm"))+"') WHERE ID ='"+ idkaryawantxt.Text.ToString() + "' AND Tanggal ='" + (DateTime.Now.ToString("MM-dd-yyyy")); I think I have error in my syntax, can you guys help me? Thanks here's the picture of error : http://sadpanda.us/images/1889033-X8SIZZN.jpg 回答1: It looks like you're missing a quote. This: AND Tanggal ='" + (DateTime.Now.ToString("MM-dd-yyyy")); should probably be AND Tanggal ='" + (DateTime.Now

ACCESS 2010 SQL— using WHERE IN on SELECT TOP subquery field

妖精的绣舞 提交于 2019-12-14 01:26:00
问题 I want this query to tell me the spending in 2012 of the companies who were the top 10 spenders in 2013! SELECT [Company], Sum([SPENDING]) FROM [Data] WHERE [Company] IN ( SELECT TOP 10 [Company] FROM [Data] WHERE [Year] IN ("2013") GROUP BY Company ORDER BY Sum([SPENDING]) DESC ) AND [Year] IN ("2012") GROUP BY Company ; When I try to run it, I get no errors, but Access says it is "running query" and never finishes. The size of the data is not the problem. This is the closest example I found

Number of Columns in MS Access 2010?

假如想象 提交于 2019-12-13 22:26:02
问题 I have 52 Yes/No Columns for attendance Weekly .. I want to make query to know the number of columns that put in it a Yes or No... Can anyone help me to solve this problem? Please let me know if you know of any recommend sites or communities for Access queries. Thanks. 回答1: I think this is a poor design. It breaks first normal form. I can envision a user table, a meeting table, and a many-to-many JOIN table linking users with the meetings that they attended. Querying for all the meetings