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 ...
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 ...
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.
...
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 ...
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. ...
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
...
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...
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...
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
...
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...
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...
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...
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...
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...
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...
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...
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.
...
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 ...
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...
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...