ms-access

creating queries during runtime in msaccess

hi, i have to create reports with certain data from an access database. i want to automate this process by the use of visual basic. i have created queries to achieve this but the problem is each time i have a different database(with same structure). queries that i have has "create table", due to which i am unable to fire those queries f...

Displaying totals within a specified date range in Microsoft Access

Although I have experience with SQL and generating HTML reports with PHP, I'm a relative beginner with Microsoft Access. I'm currently using Microsoft Access 2007 to connect to MSSQL Server 2005. I have a table of Reports that looks something like this: ReportID DateCreated Author ... I'd like to create a form that allows the user t...

How to join tables together on columns with different datatypes?

A Microsoft Access implementation is throwing a type mismatch error while trying to execute a macro that opens up some queries. Most of the tables are linked to a SQL Server and I need to join two of the tables together that have different datatypes. Table A: REFERENCE TEXT Table B: REFNO NUMBER I would ordinarily want to correct the...

How to import the content of MS Access Database into combo box of Excel?

I have a simple MS Access database with the following design: |Last Name | First Name | Country | And I have a combo box on Excel. I would like to list down all the Last Name and First Name from MyDatabase into combo box with the following format: $LastName, $FirstName I hope anyone could help me regarding this matter. Your respons...

Operation must use an updatable query. (Error 3073) Microsoft Access

I have written this query: UPDATE tbl_stock1 SET tbl_stock1.weight1 = ( select (b.weight1 - c.weight_in_gram) as temp from tbl_stock1 as b, tbl_sales_item as c where b.item_submodel_id = c.item_submodel_id and b.item_submodel_id = tbl_stock1.item_submodel_id and b.status <> 'D' ...

How to use cross join in access?

Using MS - ACCESS 2003 Table S.No Details 1 name 2 address 3 email 4 phone 5 fax and so on..., I want to combine all the details for the s.no’s. Like Expected Output S.No Details 1 name address email Phone Fax 2 address name email phone fax 3 email ...

How to join a two tables compare with date?

Using Access 2003 Table1 Personid Date1 101 02-02-2008 102 02-02-2008 103 02-02-2008 101 03-02-2008 102 03-02-2008 103 03-02-2008 101 04-02-2008 102 04-02-2008 103 04-02-2008 So On…, Table2 Personid Date1 Name Title 101 03-02-2008 Raja Accountant 102 04-02-2008 Ravi Supervisor 103 ...

MS ACCESS - Hierachical tree sort

I'm struggling with a sorting problem. I've got a table which is as follows: aspect_id (int) aspect_text (memo) root_id (int) which has as a foreign key a aspect_id I've got a non cyclic tree with the following dummy data: aspect_id aspect_text root_id 1 root null 2 aspect1 1 3 aspect2 ...

How to update or select the same rows value in the table?

Using Access 2003 Table1 EmpID Name city 101 Raja Sydney 102 Ram Melbourne 103 Ravi Adelaide 101 102 103 So on…, I want to update or select the same name, city for the blank Empid’s Expected Output EmpID Name city 101 Raja Sydney 102 Ram Melbourne 103 Ravi Adelaide 101 Raja Sydney 102 ...

SQL Selecting finished orders with multiple operations

I have a list of orders with suboperations. How can I create a list of finished orders? Finished order must have finished all suboperations. Table "orders": order_no | suboperation | finished 1 | preparing | 01/01/2009 1 | scrubbing | 01/05/2009 1 | painting | 01/10/2009 2 | preparing | 02/05/09...

MS Access 2003 - Calculating an average based on qty sold/per site with supply %

Here is another question I have about being able to calculate this scenario in Access, or even at all for that matter: I have a query that find the TOP 5 items sold in a given timeframe, and it groups by site. I use this to create a comparative chart between the site for ppt presentations. I do a lot of these but I have a problem with t...

Moving from Microsoft Access 2007 to Sql Server 2005

I have MS Access 2007 Databases and VBA modules associated with it. I Now want to upgrade my project so as to use Sql Server 2005 and Vb.net using visual studio.net. Can any one suggest Complete details on the transfer without much hassle or data loss.? Thanks In Advance ...

Querying Access 2007 multi-valued fields using ODBC

I have an Access 2007 database that uses the "Attachment" datatype (new in Access 2007) for one of its field. This field is a magical "multi-valued" field that can contain several attachments. I would like to be able to easily see the contents of this field, for all the rows in the database, using a single ODBC query. Ideally, each ro...

Import from csv to ms access tables using macro

Can some provide me a VBA macro to import data from a CSV file into ms access tables ? ...

Access Utility to Find a Field in MDB

HI I want to find a particular field, which exist in tables of a Access database. Is there is any utility to find this? ...

Trouble writing a query to select one row per "date", given certain conditions

I am having trouble writing a query to select one row per "date", given certain conditions. My table has this structure: ID date expiration callput iv delta 1 1/1/2009 1/20/2009 C 0.4 0.61 2 1/1/2009 1/20/2009 C 0.3 0.51 3 1/1/2009 2/20/2009 C 0.2 0.41 I woul...

How to update the null column?

Using Access 2003 Two Table, Tmp_cardevent1, tmp_cardevent3 Query SELECT AllPossibleCardEvents.PersonId, AllPossibleCardEvents.CardEventDate, Actual.Intime FROM ((SELECT p.PersonId, AllDates.CardEventDate FROM (SELECT DISTINCT CardEventDate FROM TMP_Cardevent3) AllDates, Tmp_cardevent1 p) AllPossibleCardEvents LEFT OUTER JOIN TMP_c...

Update calling all rows if clause in vba

i am writing a macro to convert the zeros in the access table to "0000" Zero is text data type so i cast it to int in the if condition to update the records which is only zeros and preventing it in updating records which are non zeros but now all the records are getting updated ..if clause is calling all the time even there is a value...

How to use the "Locals" window in VBA IDE

When I'm coding VBA in Access 2003, I keep the Immediate window visible and I use Debug.Print and Stop to solve my challenges. But I've never known how to get help from the "Locals" window. I understand what's in there for the most part. But it usually seems like I'd have to dig around for the item I want, and it could take a while to...

Access database query for using month from a date

Hi, I have the following table schema in acess (2007). Date eventDate bit(boolean) lunch, bit(boolean) snacks, bit(boolean) Tea, I would like to have a single query that gives count of luch, snacks and tea (each as a column) for a given month (using the eventdate). Thanks for help. ...