ms-access-2010

Read Excel file sheet names

回眸只為那壹抹淺笑 提交于 2019-12-20 05:17:11
问题 I have an export process that transfers data from my Access tables to an Excel File. A couple times I have had issues where the process didn't generate one or more of the sheets (1 sheet = 1 table) in Excel. So when the transfers are complete I want Access to check if all the sheets are located in the Excel file. I have most of the Check process worked out all I need now is a way to "read" the sheet names from the Excel File in to a table. How can I read the Sheet name (not the data)? 回答1:

Convert old Oracle outer join syntax (+) to JOIN

与世无争的帅哥 提交于 2019-12-20 04:57:31
问题 I have a query that was written for Oracle using the old (+) syntax and now I want to convert it to Access SQL. Here is my query: select BOOKCODE.BOOKCODEID,BOOKCODE.BOOKCODENAME from Application_bookcode, BookCode where BOOKCODE.BOOKCODEID (+) = HMISUnitTest.APPLICATION_BOOKCODE.BOOKCODEID and HMISUnitTest.APPLICATION_BOOKCODE.ApplicationId = 7 What is the equivalent in Access SQL? 回答1: If I remember the old Oracle outer join syntax (and it's been a long time ), the corresponding query in

How to convert a text field to a date/time field in Access 2010?

余生长醉 提交于 2019-12-20 04:52:03
问题 I am importing an excel file into Access 2010 and the date field(CALLDATE) comes in as text(YYYYMMDD). I would like to use an update query to update a new field "dateofcall" but using a date/time format. I tried to use: UPDATE tbl_Import SET tbl_Import.dateofcall = CDate([tbl_Import].[CALLDATE]); I thought it was going to be that simple but it shows up blank with a date format. I also tried to use DateSerriel() but still was getting errors. Any suggestions? 回答1: You can use left, right and

How to convert a text field to a date/time field in Access 2010?

こ雲淡風輕ζ 提交于 2019-12-20 04:51:31
问题 I am importing an excel file into Access 2010 and the date field(CALLDATE) comes in as text(YYYYMMDD). I would like to use an update query to update a new field "dateofcall" but using a date/time format. I tried to use: UPDATE tbl_Import SET tbl_Import.dateofcall = CDate([tbl_Import].[CALLDATE]); I thought it was going to be that simple but it shows up blank with a date format. I also tried to use DateSerriel() but still was getting errors. Any suggestions? 回答1: You can use left, right and

Add record on button click only

天大地大妈咪最大 提交于 2019-12-20 04:19:06
问题 I have a form that has the 'data entry' property set to yes. It is bound to a table. When I start filling in the form it automatically saves it. I do not want this to happen. I only want the form to save to the table when I press a button. Any easy way to do this? w/o vba. If i can only do this with vba let me know how to do it that what. 回答1: The best way to do this is with an unbound form. When the user clicks save, you can run a query to update your table from the controls. Using a

How to save RichTextBox content in Access2010

荒凉一梦 提交于 2019-12-20 03:55:18
问题 I'm creating a dictionary system, where words meaning is editable in RichTextBox (for user define FontSize, Color, etc...) So how to can I save meaning RichTextBox content in the Access database in RTF format? And how to can I read this? 回答1: Native Rich text in Access 2007/2010/2013 uses a subset of HTML, not RTF, so unless you want to convert to/from RTF<>HTML when you load/save your data, you will have to find another way to store your formatted text. Since the WPF RichText control uses

How is this returning a blank value?

随声附和 提交于 2019-12-20 02:57:06
问题 So this code is meant to serve as a simple search system to go to certain records in a recordset. I originally had it so they had to click the btnGoToID button in order to perform the search. I decided to just make it a little more user friendly and make it so the search field listened for the Enter button and that would perform the search as well. The issue that I am running into when the code gets to strID = Trim(Nz(Me.txtSearch.Value, "")) the value will randomly come back as an empty

How to freeze Parent Form while Child Form is open

陌路散爱 提交于 2019-12-20 02:52:19
问题 I have a situation where, in certain circumstances, i need to open another form and keep that form focused (modal = true) and when they are dont and it closes, a control on the parent form is refreshed with possible data that might have changed. Originally i had a method that would DoEvents while the child form was open but it cause several of the child forms to be unusable (they werent databound at the form level) for data-entry/edits. ShowForm Method - Originally Public Sub ShowForm(par As

Access DB Transaction Insert limit

倖福魔咒の 提交于 2019-12-20 01:59:09
问题 Is there a limit to the amount of inserts you can do within an Access transaction before you need to commit or before Access/Jet throws an error? I'm currently running the following code in hopes to determine what this maximum is. OleDbConnection cn = new OleDbConnection( @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\myAccessFile.accdb;Persist Security Info=False;"); try { cn.Open(); oleCommand = new OleDbCommand("BEGIN TRANSACTION", cn); oleCommand.ExecuteNonQuery(); oleCommand

C# windows application access database data doesn't persist on close

倾然丶 夕夏残阳落幕 提交于 2019-12-20 01:41:32
问题 I'm creating a windows application using C# whereby I'm accessing an empty Access database which contains two tables: Provinces and Locations. I'm working on the form that just deals with the Provinces table which looks like this: This is a subform. When it is open, I can insert/update records etc. Whenever I make a change, I click on the Load Table button to display the changes in the DataGridView object. If I close this subform and show it again, I can click on the Load Table button and