ms-access

How to use Microsoft Office Access's Subform control in a VB6 Form?

I like the subform/subreport control in Access, and I want to put an instantce of the control on my VB6 form. I reference the msacc.olb in my VB6 project, and put the following codes in my form module. Private Sub Form_Load() Dim aa As Access.SubForm Set aa = Me.Controls.Add("Access.SubForm", "sf1") aa.Name = "vvvddvv" aa.Visible ...

MS Access Freezes Up After Text Import

I have the following code to import a delimited file into an Access 2003 database: Public Function importTextFile(sFile As String, _ sTable As String, _ sSpecification As String) On Error GoTo importTextFile_EH ' Validate arguments to see if the objects exist; if not, giv...

Using math functions in Sql with MS Access

I designed a query in SQL View using MS Access: select floor(num1) from t1; When I run it, I get "undefined function floor". I get similar errors for Ceil, Mod,Power, Sign, Sqrt, Trunc, and initcap functions. Does the Access database engine's SQL syntax have equivalent functions? ...

Make persistent a DAO recordset in a class module

I am filtering a DAO recordset for sub-results as part of a set of recursive tasks. I'm trying to speed the routine, and I can see the recordset is being opened fresh every time the class object is instantiated. This step happens many hundreds of times. Isn't there a way to re-use it? The keyword here is persistence, isn't it? I'v...

Import Tab delimited Text File to Access Database.

I have a tab-delimited text file and want to import it in MS Access using VBA code. I have created an MS Access form and have used the DoCmd.TransferText method: DoCmd.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage) It works well for CSV File. I'm not sure how to do it in cas...

Error Handling in Access, VBa

I have imported a tab-delimited text file in an Access database on a button click event. The file is properly imported, the issue comes if the user selects a text file of different format, the code will import the improper data into the database and creates a new ErrorLog table. How do I restrict improper data from table? How to do err...

MS Access 2003 - How can I delete records from a table that have certain criteria

Rookie question I know. I have a table with about 10 fields, one of the fields is a category field. I need this field to exist because of the multiple types of categories. However, one category in this field is wrong and is duplicating results. So can I delete all records in the table that have "Type320" in the CatDescription field, an...

Conditions on outer joins

I'm trying to come up with an Access query which is equivalent to this oracle query select ledef_name, count(class.EVT_PK) timesTaught from ingenium.ledef course, ingenium.evt class where course.LEDEF_PK = class.EVT_LEDEFFK(+) and class.EVT_STARTDT(+) > to_date('2009-01-01', 'yyyy-mm-dd') group by ledef_name In ac...

Insert dataset records in database

I need to insert the dataset records(C#) into the MS Accessdatabase table. I need to do the bulk insertion of records. How can I do this in C# ...

ms_access-forms to reports

I created a form in access. I created a combo-box to display all clients, once a particular client is clicked a sub_data-sheet appears showing the (many) details of that client(in table form) Now I need to create a report listing that client name with that clients details as the form has it, the twist come when the report must be able t...

How do I make an editable UNION query?

In the course of a complex database structure, I need to provide the user with a means of editing data stored in a series of tables. Although all the data types are the same, they don't line up 1:1 in their names. To alleviate this, I created a query that maps the original names (which come from outside reports) to the internally-used ...

Exporting Charts of Access to Image Format? Charts Trns Bad after Using acOLEClose.

Hi Friends, I have Created a Chart in Access forms and Exported it in Image Format.. Its Easily Done, but the Problem comes when after it.. I closes the Form.. It Shows a Pop-up Msg "The operation on the Chart object failed. The OLE server may not be registered. To register the OLE server, reinstall it. " Then I have done some chang...

Is it really wise to close connections immediately with Jet/ADO?

I've done extensive research on this topic and intensive discussions with my co-workers. The general consensus seems to be, that a database connection should be opend when needed and closed immediately. Any caching/pooling of connections should be done by the database driver or some other layer, but not by the application itself. But ...

DB user can see no table using ODBC link in MS Access

Hi, We are facing an issue with MS access. There are two users having the same access for tables and previliges in database. But one user can access the tables from MS access and another user can't. Can you please let me know the reason. Thanks for updating from options. I am looking in to it. User having grant permissions for SELECT ...

Why Does Access Return Different ResultSet When Query Run Programmatically?

I've written a query in MS Access. This is a simplified version: SELECT IIf([category] LIKE "*abc*","DEF",category) AS category , Month , Sum(qty) AS [qty] FROM [tableX] GROUP BY category, Month The purpose of the query is to sum quantities of a product in different categories for different months. I want to aggregate categories lik...

User facing an issue with MS- Access

Hi, Currently user using connections to both TEST and PROD instances using MS Access, and everything goes well. By using ABC user. Now user having problems with APPS user in TEST . Also, user having the same problem with user XYZ in PROD instance. This user has the ‘SELECT ANY TABLE’ privilege, so it should be able to see the tables,...

Access development - keeping Live database in sync with dev database

Hi I'm a MSSQL developer and I've recently been tasked to fix up an Access based system. This change involves making database changes. I dont want to develop on the "live" datbase, i'd rather make a copy of one and then at the end when all testing is complete sync the live one with the dev in terms of the structure. How do I do this w...

Access report: Determining the form the report was called from.

Is there anyway to determine the form name that the report was called from? I would like to write some VBA code in report to determine where is the report was called from. I have Access 2003. ...

Is MS Access a viable database for storing narrative, charts, graphs, photos etc?

As mentioned I write a lot of proposals to reply to government RFP's. No matter what the RFP is about most require the same information. It is always narrative, charts, graphs, photos, tables, organizational charts, etc. To save time cutting and pasting and searching old proposals I was wondering if it is possible to create a database...

Access continuous forms -- how to individualize controls per record?

I have an Access form displaying a tiny amount of data for a certain type of record. Basically it just prints the name on the left and on the right has a bunch of Rectangle controls whose background color I change in the form's OnLoad() function, according to results from a query performed using that record's ID as parameter. This all w...