ms-access

How can I get rid of a persistent VBA Form Object that won't honor the form deletion?

I have an MS Access 2003 database that I'm using to develop a basic little inventory app. I have added some extraneous forms along the way and I wanted to get them out of the DB. I deleted most of them just fine but one of them appears to have left behind its VBA Object. All that's in the object is Option Compare Database. Now whenev...

Inspect Call Stack in VBA

Would It be possible to see Stack in VBA (MS Access 2003). I mean Would it be possible to see what procedure or function this function was called from... ...

SQL Query to VBA and display result in Form

So I have a few Queries already written and my goal is to have a user input certain fields that would change the way the Query is returned, basically having the user change 2 or 3 parameters of the original Query. First, I'm having problems getting a Query to execute in VBA: Private Sub QResultButton_Click() DoCmd.OpenQuery (Readings200...

Best Book to Learn VBA?

Anyone have any suggestions for good books or even links? I was tasked with writing some things at work and they insist on using VBA and I am not very familiar with it. EDIT Identical to: http://stackoverflow.com/questions/483086/book-recommendation-for-visual-basic Except this is visual basic and not VBA which are different. And the...

How to disable Macro and Start-Up values while opening the MS Access DB.

In my previous question heading as bellow: "How to avoid Linked Table manager message while opening the Access DB." I have asked how to disable Macro (programmatically vb.net) while opening the MSAccess DB and I got some good reference and code samples to do so. But unfortunately I could not able to achieve the expected result. I have...

How can we compact a access database in VB.NET or C#.NET without using DAO and JRO

Hi, I am using Access database. Now i compact the database by using DAO and sometimes using JRO. But to this both, we have add the COM reference. I don't want to add the COM reference for compacting. Is there any other way to compact an access database without using the COM reference(for DAO and JRO). Kind help needed. Thanks. Siv...

How to delete data in all ms-access tables at once?

Is there a way in MS-Access to delete the data in all the tables at once. We run a database in access, save the data every month and then delete all the data in access. But it requires deleting data from a lot of tables. Isn't there a simpler/easier way to do so? ...

Run Query Against ODBC Connected Table VBA

I have a table (readings) already connected by ODBC in Access that opens very quickly when I click on it. However, when I try to run this in VBA I it locks up and never displays anything: Dim strSql As String strSql = "SELECT readings.ids " & _ "INTO ids_temp " & _ "FROM readings " & _ "WHERE readings.ids > 12...

Why would AccessDataSource return different results to query in Access?

Hi, I have a query to return random distinct rows from an Access database. Here is the query: SELECT * FROM (SELECT DISTINCT m.MemberID, m.Title, m.FullName, m.Address, m.Phone, m.EmailAddress, m.WebsiteAddress FROM Members AS m INNER JOIN MembersForType AS t ON m.MemberID = t.MemberID WHERE (Category = 'MemberType1' OR Cate...

Looking for MISSING records

I'm a bit rusty when it comes to MS Access and I am hoping someone can help me out..... I have a list of all items that have been scanned (for purchase) by each store, by UPC for a one month period. I also have a particular group of UPC's that I want data for. What I want to get is the items that DIDN'T get scanned. Obviously, the it...

Access Compare Database Schema

Hello I want to compare two Access database and check is there any field or type mismatch within that or not. Is there any way we can check that using dataset or is there a faster way to do that? Thanks. ...

MS Access query: why does LIKE behave differently when being called from VB6 app?

I don't do a lot of coding with VB6, but I'm updating an existing app now and just encountered a snag. I figured out the problem. In VB6, queries must use the % wild card when using LIKE, but in MS Access, you have to use the * wild card. I'm querying the same database - (it's in MS Access). When querying from within MS Access, the f...

Getting Value from MS Access form from Excel VBA.

What is the best way to check is access form is open and get the value of textbox using Excel VBA. I mean is there a way to check if MS Access application is running and if it is then check certain form is open then get the value from this form's textbox field. Something like If MSAccess.([Application name]).Forms("FormName").isOpen...

Change Access link from SQL Server to another Access file?

I've seen lots of questions regarding moving data from Access to SQL Server, but I'd like to go the other route. Here's why: I've been working on a sizable project with a SQL Server 2008 back-end and Access 2007 front-end. I'd like to be able to do some work on the front-end from home over the weekend, but I don't have access (VPN or ...

Query will not run with variables, will work when variable's definitions are pasted in.

This is a Query in VBA (Access 2007) I have 3 strings defined: str_a = "db.col1 = 5" str_b = " and db.col2 = 123" str_c = " and db.col3 = 42" Then I use these in the WHERE part of my Query: "WHERE '" & str_a & "' '" & str_b & "' '" & str_c & "' ;" This fails, but If I paste in the strings like this: "WHERE db.col1 = 5 and db.col2 ...

How do I handle MS Access transactions in a multi threaded application, and how do I syncronise MS Access and Oracle tables?

I'm in a project to write a program using local database. We use Delphi, MS Access and Oracle. The issue are: There are several threads needed to insert and update MS Access DB. I haven't test it now, and I know access have a multi-thread issue here. Whether I need to use a lock or put MS Access DB operation into on thread? We need...

Average, Count, etc of entire column of table in SQL Query or as Function in VBA to Display result in Form?

I need to calculate Count, Average and a couple other things of a column as a result of a Query and then put the result in a text box in a form. I was thinking about either implementing it in the Query and putting the results in a column or something like that, OR use a VBA function to calculate it; however I don't know how to calcula...

MS Access (MDB) concurrency

For a small project I need to utilize a simple database with very light requirements: few tables, no more than few thousands of records in total, 2 or 3 users. I am working in .NET environment. As a database server (even those Express editions) seems like a huge overkill in this case, a very simple MDB database could do for most of the ...

VBA CDate doesn't match Convert(datetime,) in SQL Server 2005

In Access 2003 VBA (Used Immediate Window) ? CDate(39870) Returns: 2/26/2009 In SQL Server 2005 (SQL Server Management Studio) SELECT CONVERT(DATETIME, 39870) Returns: 2009-02-28 00:00:00.000 Do they always differ by 2 or is there some other date setting I'm missing? Server Collation = SQL_Latin1_General_CP1_CI_AS ...

Application Icon path in MS Access

How do you access the Application Icon path in MS Access 2003 programmatically? ...