ms-access

Microsoft Access with JDBC: how to get the "caption" property of a given field?

Hi, at work we have to deal with several legacy databases stored in the Microsoft Access format. One of the informations we need to extract is the "caption" property of the fields on a given table. If we are using VB Script, this is quite easy, as you can see on the code above: set dao = server.createobject("DAO.DBEngine.36") set ...

Create a field name from a recordset

I have a form that displays information on a project that has 10 check boxes. The check boxes are named "chkAudience1", "chkAudience2", etc through "chkAudience10". Any combination of boxes can be checked from none to all and anything in between. Then I have a table that links the check boxes to the project. This table contains a field ...

MS Access 2003 - Opening a report without it printing

I used Docmd.OpenReport "Report1" from another form and it seems to just want to print the report without actually displaying it. I want to display the report, not print it ...

can't query SQL linked server -> MS Access remotely, only works on server

I'm working on a C# application that queries a SQL Server 2008 Express instance on a remote server (LAN). When I am at my workstation/dev machine, I can open SQL Server Management Studio and connect to the SQL instance through Windows Authentication, and for all intents and purposes the experience is identical to working in SSMS "on" th...

MS ACCESS 2003 - Question about passing information from an unbound form to a report

I use something like below to pass information from one unbound form to another (excuse the no error checking): Sub Button_Click() Dim db as DAO.database Dim rs as DAO.recordset Dim sql as string docmd.openform "NextFormIamAbouttoUse" sql = "SELECT * FROM tblMain WHERE MainID = " & Me.As_MainID & ";" ' usually debug here set db = cu...

ADODB recordset in VBA says excel field is empty when it's not

I have an excel sheet I need to import in my Access database. The sheet looks like this: DATE RECEPTION DENOMINATION ITEM N° QUANTITE RECUE 06/01/2010 DVD-Sex ...

Event that fires when a form changes

I have form that displays information on a project. Most of the fields on the form are bound to a Project table and display and update as bound fields do. However, I also have 10 checkboxes that come from a ProjectAudience table. Only if the box on the form is checked, is there is a matching record in the table. Therefor, I need to inser...

MS Access 2003 - VBA for Parameter box that open after code is run: auto "ok"??

So there is a parameter box that open after a button click event runs an sql statement in vb for a list box to populate data. something like: me.listbox.rowsource = "SELECT tblMain.ID, TblMain.FirstName, TblMain.LastName, tblMain.MobileNumber FROM tblMain;" then i count the result for display like: me.recordcounter = me.listbox.listc...

Excel pivot refresh, save and close in Access VBA code

I am using the following code to refresh Excel pivot tables from an Access application. What is the best way to save and close the Excel app after the pivots refresh? In my last attempt the code was trying to save and close before the pivots had refreshed. Private Sub Command161_Click() Dim objXL As Object, x On Error Resume N...

Access Nz() function doesn't work in query

I have lots of orders in tblOrders and a few deliveries in tblDeliveries. SELECT tblOrders.SkuBestelId, Sum(tblDeliveries.delivered) AS TotalDelivered FROM tblOrders INNER JOIN tblDeliveries ON tblOrders.SkuBestelId = tblDeliveries.SkuBestelId GROUP BY tblOrders .SkuBestelId; Of course, this gives me lots of "TotalDelivered" fields wi...

Can an SQL stored procedure simply return its inputs, concatenated?

To fit an edge case, I'd like to create a stored procedure (Access SQL!) which simply returns the concatenation of three inputs. So MyProcedure('AAA','BBB','CCC') returning 'AAA,BBB,CCC' Obviously this is elementary in most programming languages, but I didn't know if SQL was capable of this at all. ...

ms access crashes when loading an mdb containing a linked sql server table

I have an mdb which used to contain a bunch of linked tables. These links point to tables in another Access mdb. As part of a controlled migration, I'm changing these link table to point to an SQL server instance instead, by iterating through all linked tables and updating the connect string to an ODBC one, then calling RefreshLink on ...

Access get all tables

Dear All, Is there a way in by sql statement or vba code to return all tables from access file? "I don't know the name of the tables" like when you want to have all fields in a table you use '*' regardless the names of the fields. but how to get all tables?!!!! ...

sql statement to return all fields from all tables

select * from * yes this is what I want I want to return all fields from all table in my ACCESS database regardless the fields names or the tables names!!! for example if I have table1 and table2 as tables in my database access file what I want is to generate this statement select * from table1,table2 from sql query which run fin...

how to get all tables by editing dsn file "data source file"

Dear All, By having the next dsn file: [ODBC] DBQ=C:\\SLA.mdb C:\\SLA.mdb DefaultDir=C:\ Driver={Driver do Microsoft Access (*.mdb)} DriverId = 25 FIL=MS Access MaxBufferSize = 2048 MaxScanRows = 8 PageTimeout = 5 SafeTransactions = 0 Threads = 3 UserCommitSync = Yes [Microsoft Office] DefaultTable =table1 how could I edit it to have ...

MS Access- Linked Table

i was recently working on a simple dataentry form in ms access which was accessing the table,which is linked to a excel sheet. where i had a first column of type Date/time( Column Name : AllocationTime). I have around 100 rows which has the value '1/14/2010 11:30:38 PM' for all the *100 row*s. I bonded this column to a Combo box, when i...

Do we have transactions in MS-Access?

I am developing a small desktop application using C#.NET and MS-Access. I don't have any prior experience of MS-Access. I want to know if we can use transactions in Ms-Access or not. I have the below mentioned situation. Insert in Tbl1 Insert in Tbl2 I want to insert in tbl2 only when insertion in tbl1 is successful. And if there ...

Use code to do a screen capture of an application running

I need to run some code to capture the window of an application running on the windows desktop (windows XP is fine here). There are a number of VB6 examples on the web, but they tend to capture the running VB6 application or the desktop only. I am looking for a solution that captures a given window/application. So, I want to be able to ...

How to retrieve last autoincremented value in MS-Access like @@Identity in Sql Server

I want to retrieve identity column value in ms access from an autoincremented column. Basically i m running a transaction in which i have to write two insert queries. 2nd query will be containing autoincremented value that was generated from query 1. how can i do that ? ...

how can I add records through a query in access?

Before I remade this simple database, I was able to perform a query and update and insert new records from that query. I can no longer do this and can't figure out why. I'm not very knowledgeable with access so any help would be greatly appreciated. I have a feeling that this may have something to do with the auto number column that no ...