ms-access

How to import a files like PDF MP3 DOC XLS into a MS SQL Server Datatable field using VBA code in Access2007

Hi, does anybody know how to save and retieve files in MS SQL-Server 2000? I guess the image data type could be used as a container. I want to import/export the following file types: DOC, XLS, PDF, BMP, TIFF, etc. Due to resource issues we are using MS-Access2007 as the front end, so I am looking for VBA code. Thanks in Advance. ...

vba to make table when field names are dynamic

Hi, I have a crosstab query that uses a dynamic date function to result in the column headers and therefore the field names. Ex: ForecastPeriod:DateAdd("m",[Period],[StartDate]) This means that every time I run the crosstab query, I could end up with different field names. I need to take the results of this crosstab and combine it with ...

SQL Server 2005: "Protecting" stored procedures from FMTONLY mode used by MS Access

Some of the stored procedures we have contain conditional logic, like this: Create Procedure dbo.DoSomething(Some Parameters) As ... If (Some Condition) Begin Set @SomeVariable = SomeValue End ... Select ... When such a stored procedure is used as a recordsource for an MS Access form, and us...

Will the .Net Entity Framework work with a .mdb?

Can use a .mdb file as the data source for an Entity Framework model using the Microsoft Jet OLEDB data provider? If so, how will I be limited? No stored procedures, for example. ...

Replacing MS Access forms

We have a number of very old data entry forms that were made in Access that link to our SQL Server database. Each form may have any number of sub-forms. We'd like to move away from using these access frontends but don't have the time to create a new app or web app to replace every form that we've got. Is there another option that would...

How to attach DBF file in Access programmatically?

Access can open DBF (dBase) files, but instead of physically converting the data into MDB format, it has the ability to link to the DBF table itself. This way the DBF is "linked" to the MDB. Is it possible to attach a DBF file in such manner using C#? Edit: I would like to use Jet and avoid using MS Access directly. ...

Avg on datetime in Access

I am porting some queries from Access to T-SQL and those who wrote the queries used the Avg aggregate function on datetime columns. This is not supported in T-SQL and I can understand why - it doesn't make sense. What is getting averaged? So I was about to start reverse engineering what Access does when it aggregates datetime using Av...

Label/Texbox seperation in Microsoft Access 2007 forms

I'm trying to create a very simple form in an Access database. Whenever I drag a texbox on the form, a label gets created with it. I want to be able to move the label without moving the textbox,but whenever I try to do that, the textbox moves with it. Its like they're linked with each other. Is there a way to seperate them from each othe...

Ways to use .Net within MS Access

I'd like to include custom .Net controls and .Net forms within MS Access. It's possible but I was wondering if there was any new good articles on that subject. Over time I've found a few related to the subject the but always found the process a bit cumbersome (see references below). One of the issue is deployment: my user's machines hav...

How to host a WPF control in an MS Access VBA Form?

We have a large MS Access project that requires GUI functionality that is difficult / impossible to do in the VBA / access forms environment. Over time, we wish to re-write / migrate to a managed C# environment with WPF as the presentation layer. The only practical way for us to do this is over a longer period of time - converting som...

vbscript to export an access query to a tab delimited file not working

Hello, I have this code: db = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\baywotch.db5" TextExportFile = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\Exp.txt" Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") cn.Open _ "Provider = Microso...

Microsoft Access Append Querydef for Memo Field

I am getting an vba error 3271; Invalid property value. This happens when trying to append a memo field in a querydef. Any ideas on how to get around this? Example: public sub TestMemoField Dim qdf As QueryDef Set qdf = CurrentDb.QueryDefs("AppendRecord") qdf.Parameters("@SomeBigText").value = string(1000,"A") qdf.Exe...

How to filter out null elements of an array in MS Access

I'm generating titles out of a few other fields, and want the "right" way to do: Me.Title.Value = Join(Array([Conference], [Speaker], partstr), " - ") Except any of [conference], [speaker] or partstr might be null, and I don't want the extra "-"'s. Are there any functions that'll make this job straightforward? ...

Is it possible to use a string as an index in VBA?

In other languages you can use strings as keys: PHP: $array['string'] = 50; $array['anotherstring'] = 150; Is this possible in VBA? ...

create databases in ms-access, then delete a particular database. using any vb query or vb code.

i want to create a number of databases in ms-access using a code or any option of ms-access, but i want delete databases also. Please help me ...

Upgrading to Access 2007, Trust Center Issue

Is there a way to automatically set Trust Center locations in a network environment when upgrading to Access 2007? ...

Link an ODBC table in Access 2007

I have an Access 2002 application which links an Oracle table via ODBC with this code: Set HRSWsp = CreateWorkspace("CONNODBC", "", "", dbUseODBC) Set HRSConn = HRSWsp.OpenConnection("HRSCONN", dbDriverPrompt, , "ODBC;") DoCmd.TransferDatabase acLink, "Database ODBC", HRSConn.Connect, acTable, "SCHEMA.TABLE", "TABLE", False, True Unfo...

sql query causing error 2950

Hello, This SQL query was generated by Microsoft Access 2003, and works fine when run, but fails when trying to run from a Macro. Is there any obvious error within the query, or any reason it would not work? SELECT tblAuction.article_no, tblAuction.article_name, tblAuction.subtitle, tblAuction.current_bid, tblAuction.start_price, tblAu...

Access: Runtime error 13 type mismatch

Hi, I am gettin runtime error 13 at the end of the following code Sub plausibilitaet_check() Dim rs As DAO.Recordset Dim rs2 As ADODB.Recordset Dim db As database Dim strsql As String Dim strsql2 As String Dim tdf As TableDef Set db = opendatabase("C:\Codebook.mdb") Set rs = db.OpenRecordset("plausen1") Set rs2 = CreateObject("AD...

What will we do after Access?

Microsoft seems hell-bent on deprecating the swiss-army-knife of database tools. What else comes close for facading/file-swapping/cloning/name-your-acronym-connecting arbitrary database servers/spreadsheets/CSV's/flatfiles? What weird kinds of functionality have you squeezed out of Access? And what else is there to take its place? ...