ms-access

SQL Statement will not execute in C#?

Hey Guys, here is my code for this, the only help i get from VS is that the INSERT INTO statement syntax is incorrect? I have gone through all of the code and just cannot see where i have gone wrong, can someone gimme a hand please? public void New(string ApplicationStartupPath, string FileName, string Department, string Month,...

MS Access VBA/SQL question! Pretty Simple

Hey I just sort of learned how to put my SQL statements into VBA (or atleast write them out), but I have no idea how to get the data returned? I have a couple forms (chart forms) based on queries that i run pretty regular parameters against, just altering timeframe (like top 10 sales for the month kinda of thing). Then I have procedures...

How to order the null values?

Using Access 2003 In my table column, some of the fields are null, some of the fields are number, and some of the fields are string Table. ID, Value 001 002 N/A 003 01 004 005 N/A 006 02 So on... I want to order the table by number, string then null values, Query, Select ID, Value from table order by value Expected Output ...

Microsoft Access 2007 & Power users

We're using MS Access 2007 as our DB and should support users with limited access (power users): The DB should be common to all users (hence cannot be located on user's private folder) We are not allowed to grant permissions for all users for R/W for a certain directiry Yet we need all users be able to use this DB. Can anyone can thi...

Problem of input mask in VBA text box ?

There is a problem in VBA text box while filling input mask property: I am trying to make the combination of date and time: Hence i put it like below: 00/00/00;0;_00:00;0;_ But while running the application, i am only getting 00/00/00 (Date). But i remember, i got the result as like 00/00/00 00.00 as expected when i first put the ...

Can I wrap an Access form with a transaction?

I want to make a form the essentially creates an invoice, but using some other related data as inputs or limits; In the process of adding items to the invoice, I need to reduce the items in another table. Since the user will enter several items at a time, I'd like to issue a "START TRANSACTION" when the form loads, and then do a "COMM...

MS Access Atomic Transactions

Is there any way to make microsoft access transactions atomic across multiple users? I have found this which seems to imply that they are not, but I am wondering if atomicity in access is driver specific. ...

Proper way to program a Microsoft Access Backend Database in a Multiuser Environment

There is a prevailing opinion that regards Access as an unreliable backend database for concurrent use, especially for more than 20 concurrent users, due to the tendency of the database being corrupted. There is a minority opinion that says an Access database backend is perfectly stable and performant, provided that: Your network has ...

Query(ms access) to Turn rows to column

Hi I have table with column in ms Access Cost Repair Maintainance Wear Fuel i want this rows as Repair Maintainace Wear Fuel as separate column as shown above ...

Does ACEDAO support row level locking?

There was a problem with DAO 3.6 in that it didn't support row-level locking. For details, see this Knowledge Base article. I learned from the Access team's blog: In Office Access 2007, new objects, properties, and methods will be added to DAO to support the new features in the Access database engine. From looking at this li...

How to copy tables from SQL Server to MsAccess in TSQL?

I would like to copy (publish for MsAccess users) some tables from sqlserver 2K to an MsAccessDatabase. Is this possible in TSQL? If not, as an alternative, is it possible to call DTS-packages from the command-line? UPDATE : tx to the answer of John Sansom I explored DTSrun, and it works just fine. This update for the syntax : dtsr...

How to build the search form in ms-access

I have a ms-access database, now I need to build a search form on table "Samples" . Now, the difficulties are I need 4 search criteria, SampleNo, SampleDate,SampleClient,SampleBatchNo. The search criterias can work together or not. I have a listbox to show the search results, and I want to be able to select more than one records in t...

Query Syntax error

Please help me correct the following query: SQL = "insert into tblContract (Empid, Start1, Finish1, Store1, " & _ "Start2, Finish2, Store2 ) " & _ "values ('" & Me.txtEmpNo.Value & _ "',select max(testid) FROM tbltesting,'" & _ Me.txtContSunStart1.Value & "', '" & _ ...

moving focus from subform to main form

i have main form MAINF and two subforms SUBONE and SUBTWO I want to be able to move focus (cursor) between them. From MAINF to SUBONE or SUBTWO, I can call Me![SUBONE].SetFocus or Me![SUBTWO].SetFocus. This seems to work. BUT: 1) From SUBONE to SUBTWO, I have no idea. what is the correct way of programatically moving focus? 2) Fro...

Insert statement with where clause

Possible Duplicate: Query Syntax error I want insert value using the below command DoCmd.RunSQL = "insert into tblContract( Empid, Start1, Finish1, Store1, Start2, Finish2, Store2) values ('" & Me.txtEmpNo.Value & "','" & Me.txtContSunStart1.Value & "', '" & Me.txtContSunFinish1.Value & "','" & Me.txtContSunSto...

Compile error:Argument not optional

Compile error:Argument not optional I am getting the above error while executing the following query: DoCmd.RunSQL = "insert into tblContract (Empid,testid,Start1,Finish1,Store1,Start2,Finish2,Store2 )values ('" & Me.txtEmpNo.Value & "','" & Me.txtAutoNumber.Value & "','" & Me.txtContSunStart1.Value & "', '" & Me.txtContSunFinish1.Val...

ruby and accdb (ms access)

If I have a base windows xp system, ruby and an ms access 2007 file (say c:/foo/bar.accdb) file, what's the least intrusive method for reading that .accdb file. What needs to be installed on the xp system. What is the specific connection string. ...

Using Access 2003 ADP/Project files to access SQL Server 2005 database

We use Access Project files to connect with SQL Server. Our SQL Server 2000 has been upgraded to SQL Server 2005 and now my project files are reporting an incompatibility and the error "This recordset is not updatable" when trying to modify data. So: 1) Will upgrading to Access 2007 and then creating project files solve this problem? ...

Query problem

When I execute this query: Dim Var Var = ("select max(Autonumber) from tblAutonumber") DoCmd.RunSQL (Var) I am getting the value of var as "select max(Autonumber) from tblAutonumber" instead of the maximum value I am looking for. Code: Private Sub btnSubmit_Enter() DoCmd.RunSQL ("insert into tblAutonumber (Dummy)values ('DummyValue'...

Multiple insert problem

I am doing a multiple insert in vba access query as below: Private Sub btnSubmit_Enter() DoCmd.RunSQL ("insert into tblAutonumber (Dummy)values ('DummyValue')") Dim lastAutonumber As Long lastAutonumber = DMax("Autonumber", "tblAutonumber") txtAutoNumber.Value = lastAutonumber DoCmd.RunSQL ("insert into tbltesting " & _ "(Empid, Te...