ms-access

How to Export Data from SQL server Compact To Access MDB

99封情书 提交于 2020-01-05 08:17:47
问题 I need a solution to transfer all data from SQL Server CE to Access mdb database. I tried this approach http://www.codeproject.com/Answers/483989/HowplustoplusExportplusSQLplusTablesplusToplusAcce#answer2 (solution # 2) but getting an error "No database specified in connection string or IN clause." The code works if I connect to non-compact SQL server. I guess the problem is with connection string in IN clause but I cannot figure out how to change it. Here is my code: private void ExportTable

Access Input Form with Custom Error Messages

淺唱寂寞╮ 提交于 2020-01-05 08:13:42
问题 The Solution The solution was to not try and capture the errors but do the error handling myself as part of the Add New Record command button: Private Sub buttonNewRecord_Click() Dim ErrorInt As Integer Dim TeleCheck As Variant Name.SetFocus If Name.Text = "" Then MsgBox "Name is missing!" ErrorInt = ErrorInt + 1 End If TeleCheck = DLookup("[Telephone]", "tblColdCallLog", "[Telephone] = '" & Me.Telephone & "'") If Not IsNull(TeleCheck) Then MsgBox "Telephone number already exists in the table

Display table field through query using form

狂风中的少年 提交于 2020-01-05 08:00:19
问题 Just some background information. My table, (HireHistory) has 50 columns in it (horizontal). I have a Form (HireHistoryForm) which has a 2 text boxes (HistoryMovieID and HistoryCustomerID) and a button (the button runs the query 'HireHistoryQuery') Here's an excerpt of my data (the CustomerID's are along the top): So what I need is so that if a number is entered into the HistoryCustomerID box, then it displays that column. e.g. if the value entered is '1', then in my query it will show all

Access Crosstab subtotal columns

余生长醉 提交于 2020-01-05 07:39:48
问题 I have a following question regarding crosstabs in Access: How do I create a subtotal columns? What I want to see as a result of the query is this: Nov 2010 Dec 2010 2010 Total Jan 2011 Feb 2011 Row1 2 4 17 3 2 Row2 8 6 35 7 5 How do I create these subtotals for the year? (It's ok, if the year data will be in the end, after all months) The problem is that I need to do this without hardcoding each year, the query should work with any dataset Thanks in advance! 回答1: Say we have raw [SalesData]

Access Crosstab subtotal columns

安稳与你 提交于 2020-01-05 07:39:25
问题 I have a following question regarding crosstabs in Access: How do I create a subtotal columns? What I want to see as a result of the query is this: Nov 2010 Dec 2010 2010 Total Jan 2011 Feb 2011 Row1 2 4 17 3 2 Row2 8 6 35 7 5 How do I create these subtotals for the year? (It's ok, if the year data will be in the end, after all months) The problem is that I need to do this without hardcoding each year, the query should work with any dataset Thanks in advance! 回答1: Say we have raw [SalesData]

How to alter title bar height for access form?

瘦欲@ 提交于 2020-01-05 07:32:27
问题 Is there a way of altering the title bar height for a form (actually a subform) when it is displayed in datasheet mode? My field titles are often longer than the data and there is not very much I can do about this. It's not a problem when the form is in 'Single Form' view, but there will be lots of times when the datasheet view is helpful, because it's a good summary of info. I had thought that forcing a new line in the field title might work, but it doesn't. 回答1: Access does not allow for

MS Access Multi-Join Query

被刻印的时光 ゝ 提交于 2020-01-05 07:26:33
问题 Can anyone find what is wrong with this MS Access Query? When I try to execute it i receive an error about a missing Operator before the 2nd Left Join SELECT * FROM ( SELECT GetitUsageTemp.MemberID, GetitUsageTemp.IDNumber, GetitUsageTemp.Title, GetitUsageTemp.Initials, GetitUsageTemp.Forenames, GetitUsageTemp.Surnames, GetitUsageTemp.CellNumber, GetitUsageTemp.EmailAddress, Nz(August.[AugustUsage],0) AS AugustUsage FROM GetitUsageTemp LEFT JOIN (SELECT dbo_Requests.fk_Members_ID, Count(dbo

Docmd.TransferText question

人盡茶涼 提交于 2020-01-05 06:49:07
问题 b'h i will be programmatically importing a text file into a table. i have saved the import steps. i will use this: DoCmd.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage) to do the import. this is what SpecificationName means: Specification Name The specification name for the set of options that determines how a text file is imported, exported, or linked. For a fixed-width text file, you must either specify a specification name or use a

Return a value from a range in MS Access

孤街浪徒 提交于 2020-01-05 06:27:21
问题 I am trying to do a very simple range lookup in MS Access. I basically have two tables: I am looking for a query that will be able to go find the appropriate range of the salary and return the correct tax rate. I started off with this as my base: SELECT IIf(Salary Between 1000 And 2000,10,20) FROM Employees; But I am not making any sort of progress. Any assistance will be greatly appreciated. 回答1: One possible method is to use a correlated subquery, e.g.: select e.*, (select top 1 t.taxrate

How to programatically refresh linked tables through VB.net?

微笑、不失礼 提交于 2020-01-05 06:25:48
问题 I have an Access frontend with a lot of tables linked through ODBC to a MySQL backend. I have a VB.net application that sometimes adds columns to the tables in the backend, and when that happens, I need to refresh the link to the table in the frontend from the VB.net app to show the new columns. I'll consider just about any solution as long as it doesn't require restarting MySQL or Access, and will allow me to refresh only the links I need to refresh (which I know in advance) as there are