ms-access-2010

Access 2010 calculating the number of workdays

蹲街弑〆低调 提交于 2019-12-11 05:19:42
问题 I am new to Access 2010 and need to get the number of days in a workweek excluding Holidays however with a twist. I have been able to use the standard VB code for workdays that appears on the internet and it works great for a simple Monday – Friday or Monday - Saturday calculation. My question is, how can I or is it possible to manipulate this code to calculate the number of days if Friday, Saturday and Sunday all count as 1 day? Example: Calculate the number of days from Tuesday 11/25/14 to

MS Access Query : Check if form is open / Check if parameter requires input

谁都会走 提交于 2019-12-11 04:47:37
问题 I'm currently trying, in a MS Access Query (using the GUI tool, and not the SQL tool), to check if a specific form is open or not, without using VBA. Using the following expression : Expr1 : [Formulaires]![Form1].[Visible] If Form1 is open, the query works fine, but if Form1 is closed, it asks for input, since the Form1 isn't open, and the variable doesn't exist anymore. Is there a way to check if a specific form is open, or to check if a certain variable requires input ? 回答1: You would need

Run time error -2147417848 (80010108) when disabling FilterOn property of Report

一世执手 提交于 2019-12-11 04:15:28
问题 I am working on creating filtering options of myReport contained in subform container. I have used solution described in this question: Filtering Report from HansUp. Using described code filter is succesfully created, stored and applied with OnClick event of apllyFilterButton. Then I create disableFilterButton and in OnClick event I put code suggested in before mentioned thread. While testing, I get this error: "Run-time error '-2147417848 (80010108)': Method 'FilterOn' of object '_Report

Fields in the wrong order when importing from CSV to Access

ぐ巨炮叔叔 提交于 2019-12-11 03:44:02
问题 I'm providing an import facility in my application to allow users to populate it with basic starting data. I have no control over how they create the data they import or whether they actually follow the import spec I provide (as amply demonstrated by the experience in beta testing to date). I've also learned that they're importing datasets way larger that I expected (largest so far is 750,000 records), so the import needs to perform well. There'll be five or six different sets of data to

Modify Chart properties in Access report via VBA (error 2771)

左心房为你撑大大i 提交于 2019-12-11 03:21:41
问题 I am building an Access report (2010 version), and would like to be able to customize it based on the user's selections on a form. When I run it, I get error 2771: The bound or unbound object frame you tried to edit does not contain an OLE object. This is the code to pass the parameter: Private Sub Command120_Click() DoCmd.OpenReport ReportName:="rpt_EODGraph", View:=acViewPreview, _ OpenArgs:=Me!Text0.Value End Sub This is the code to open the report. Private Sub Report_Open(Cancel As

MS Access run-time error 3259 invalid field data type on alter table

…衆ロ難τιáo~ 提交于 2019-12-11 03:14:01
问题 After re-installing my computer completely, suddenly I get this error: Run-time error 3259 invalid field data type on alter table when running this query: ALTER TABLE Invoices ALTER COLUMN ID COUNTER (1, 1) on a MS Access database. The data type didn't change, actually nothing changed except for the re-install.. The field ID is a Long Integer field that is set to auto increment for every Invoice that the table holds. Since data resides in this table only temporarily I reset the auto increment

Importing a module into access programmatically from a *.cls or similar file

荒凉一梦 提交于 2019-12-11 03:02:35
问题 If you open Microsoft Access, then open the visual basic window so you can see the list of modules and code in your Access project. You can drag a text-based file (txt, cls, bas, etc) from windows explorer and drop it into your module folder. This drag and drop action will import the code in the text-based file into your project and prompt you to save it (with the default name being the name of the file you dropped. Is there a way to do this programmatically using VBA? It seems like a simple

Can Access VBA tell the difference between typing into a combo box and selecting from a drop down?

纵然是瞬间 提交于 2019-12-11 02:59:48
问题 I've got a combo box, "Filter Dropdown", that triggers some VBA code on Filter_Dropdown_Change() . The problem I'm having is I want it to trigger once the final value has been selected. So, currently, it triggers when I select a value from the dropdown, which is fine, but also when I type anything, because each character counts as a change - which I don't want. Is there a way of telling when I've finished typing a new value into the combo box? Can Access differentiate at all between selecting

VB Form and MS Access SQL Wildcard Search

别说谁变了你拦得住时间么 提交于 2019-12-11 02:57:02
问题 My table table1 has 3 fields: FName , LName , Phone . I am using Microsoft Access 2010 for running the SQL query. Some rows has empty / null phone values. I have a VB form which accepts search parameters. A user can enter (FName and LName) or (Phone) , but not both at the same time. When I try: SELECT table1.LName, table1.FName, table1.Phone FROM table1 WHERE table1.LName Like ('*' & Forms!frmSearchMain!LName & '*') AND table1.FName Like ('*' & Forms!frmSearchMain!FName & '*') ORDER BY table1

How can I connect to a System ODBC connection is Access 2010 on Windows 7

帅比萌擦擦* 提交于 2019-12-11 02:55:57
问题 I'm trying to connect an Access DB (2010 32-bit) to a System ODBC connection on a Windows 7 PC (64-bit) However, when I try to link to the Machine Data source for it, I can't find the ODBC data source I created. I know there's an issue between 32 bit apps and the 64 driver. And that there are two version of the ODBC Datasource Administrator C:\Windows\SysWOW64\odbcad32.exe C:\Windows\System32\odbcad32.exe I've tried both, and neither one seems to be able to create an ODBC source that is