ms-access

Query Excel worksheet in MS-Access VBA (using ADODB recordset)

I'd like to query an Excel worksheet in VBA and specify conditions. The simple query "SELECT * FROM [PCR$]" works perfectly, but I don't know how to add a WHERE clause. I tried cmd2.CommandText = "SELECT * FROM [PCR$] WHERE ([B1] IS NOT NULL)" but then it complains about missing parameters. This is the complete code: Dim rs2 As New ...

Security model (deployment) for MS Access application with SQL Server Backend

We have an application, consisting of an MS Access frontend (2007, mdb format), a few .net libraries and an SQL Server (2008) backend. I am working on an installer, which automatically installs the MS Access Runtime, our application, our libraries, SQL Server Express and configures everything. Clearly, the MS Access application and the ...

Export Objects in MSAccess Application to Text Objects, and Import Into A New MDB

I need to export all of the objects from my MDB to text files in a folder, and them import those text files as fresh Access objects into a brand new MDB, using some VBA code. Does anyone have the source code for this? I know it exists out there somewhere, I just can't find it at the moment. ...

MS Access : Determine Object Type

Is there a way to determine the Object type, when passing a reference to a function? I'm using a security permissions function, which determines if the user has permission to view/edit the Form passed to it by reference. I'd like to expand this to include reports as well. To keep the function generic, I'd like to pass a ref for either ...

In Access97 SQL how do I return a range of rows?

Hi, I have an Access97 database (unfortunately) and I am querying it over ODBC. I want to construct a query that will return me J ordered rows starting at offset K. Right now for a related operation I am using a sub-query and the TOP keyword, this works fine but I don't think I can use it for this new operation I am trying to perform. ...

need help with access query - removing duplicated rows

hi i have this table A-----B-----C 123 ----3--------5 123----44-------7 123----6--------8 how to delete duplicated rows - but leave only the firs row ? i'll get this result A----B----C 123----3------5 thank's in advance ...

MS Access UPDATE QUERY Problem

Hi, I am trying update my table from c# ado.net with this function.I am using for update process stored prosedure in access db.Everything working fine in MS Access side.Giving parameters to access and its update well.But when i tried this in c# ado.net side not giving any error but its not updating.I have got so many working stored pro...

Can this MySQL db be improved or is it good as it is?

In a classifieds website, you have several categories (cars, mc, houses etc). For every category chosen, a hidden div becomes visible and shows additional options the user may specify if he/she wishes. I am creating a db now, and I have read some articles about normalization and making it optimized etc... Here is my layup today CATEGO...

Edit query in MS-Access with a subquery containg a SUM() field

When I open this query in Access (which is just a collection of 2 linked tables) I'm able to edit the data with no problems whatsoever. SELECT O.*, PP.skuapexid FROM tblSkuBestellingen AS O INNER JOIN tblSkuApex AS PP ON (PP.begindatum <= O.besteldatum) AND (PP.sku = O.sku) WHERE NOT EXISTS ( SELECT * FROM tblSkuApex PP2 ...

Reading data from a table (newbie MS Access)

Hello, I realize the newbieness of this question, but google searches are not helping me. I've created an MS Access database and am trying to automatically update a cell in a row when another cell is updated with data from a drop-down menu. I've created a sub "afterupdate" for the text box in the form, and can simply create a "select ca...

Getting return values from an embedded Internet explorer

I know how to open an Internet explorer from within an VBA application. But how to I get "return" values from the running explorer to the VBA application. E.g let us assume I try to access http://page_not_there and got back an Error 400 How can I get this value in my VBA Application and act accordingly. Any hints or links or programmin...

Using loop in a Access Query

I have a table named OT Hours which has the following column EmpId, Date, Hours. I need to insert a constant value in the hour column for 12 months prior to the current date for 6 employees. Can I use a for loop in the query? If yes, Please provide me with an example. as of now, i can do it in VBA as follows Dim j As Integer For j...

MS Access SQL DELETE - why would someone specify column names?

I'm having to support an Access .mdb file that someone else has written. One of the button functions in this .mdb calls out to delete some data in an external MSSQL database. All very straightforward, but this syntax isn't something I've seen before: DELETE tblEquipmentConnections.SourceEquip, tblEquipmentConnections.EquipmentConn...

Compile time: Syntax error

I am able to add controls to a form when it is loaded. I need these controls to be to be catagorized so the user only can see a few at a time. My first thought was to attached the controls to particular tabs. Not sure why the syntax is off in the following code. Thanks for the help! Private Sub Enter_Records_Click() Dim stDocName As St...

MS Access 2007 3044 Error

I have an Access database which is split, and have moved it from the network and a client machine to my machine to test and debug. When I run the main/startup form, I get: Run-time error 3044. [Old Path] is not a valid path. Where "Old Path" is the path where the back-end file used to reside. I found some posts that talked about usi...

Ms access: Autocomplete field with values from another table

Hello, please forgive me for my poor english and my big ignorance on programming. I'm using Ms Access 2003. Let's suppose i have two tables: Table1: ID (autonumber), [...], Keywords (memo) Table2: ID (autonumber), Keyword (text) I want: 1) As the user types letters in Table1.Keywords that my database searches in Table2.keyword for t...

SQL: Using NULL values vs. default values

What are the pros and cons of using NULL values in SQL as opposed to default values? PS. Many similar questions has been asked on here but none answer my question. ...

Started to get a Run-Time error '3159'; Not a Valid bookmark all of a sudden in Access 2007

I am really new to programming access. I converted an old 97 access db to access 2007 and it has been working fine for awhile. Today I go into it and was snooping around in design view and looking at the code. I didn't change anything. Just looked. When I went to run the code I kept getting the "Not a valid bookmark" error. Just to be ...

Access 2007 Encrypted BackEnd Slow Only With New ACCDB

I have encrypted back-end ACCDB on Win/2003 network. Front-end on user workstations. Link tables and make copies. All works perfectly. I open a fresh blank database and link to same back-end. It is extremely slow, but only from a new front-end. Clicking on any tables takes forever to launch. It appears to be a problem only if othe...

Can we create multicolumn unique indexes on MS access databases?

We'd like to prevent record duplication in our MS access database using a multicolumn unique index. Because of how the data is sent (via network), duplicate data is sometimes received. The data source does not send a unique ID, so the simplest option is to prevent duplicate records being inserted. According to Unique Index Design Guidel...