I am writing an application in C# that reads info from a .mdb file using the System.Data.OleDb namespace. The table I am reading from contains information about a sample (number, index, date, etc). The number and date are required entries when a new item is added to the table, but the index is optional, so some samples do not have an ind...
I've encountered a strange error when attempting to update a SharePoint 2010 list that I have linked to via Microsoft Access 2010.
Error: Data cannot be inserted because there is no matching record.
This occurs in 2 scenarios:
I attempt to run any UPDATE query against the list in MS Access
I attempt to update a record from the list...
For error handling code, I would like to get the name of the current VBA function (or sub) that the error occurred in. Does anyone know how this could be done?
[EDIT] Thanks all, I had hoped that an undocumented trick existed to self-determine the function, but that obviously doesn't exist. Guess I'll stay with my current code:
Option ...
I have access file and when i try to open i got this error:
You do not have the necessary permissions for this object XX...
Ask the administrator or user who created this object to
create the appropriate permissions for you
is there any way to open it ? or any tool for this ?
thank's in advance
...
I have a DataGridView that displays data from a MS Access database. I'm using a DataSet with a TableAdapter and a BindingSource to link the data to the DataGridView:
tableAdapter = new AccountsTableAdapter();
dataTable = new Accounts.AccountsDataTable();
tableAdapter.Fill(dataTable);
tableBindingSource ...
HI,
I'm using MS Access as a frontend to PostgreSQL database.
And I have run into dead end:
How would I get return value of passthrough SQL INSERT statement?
I tried something like this:
strSQL = "INSERT INTO someTable (col1, col2) VALUES ('val1', 'val2') RETURNING col0"
'Create passtrhough query dynamically (another function)
Create...
Hi I have an App with nested sub-forms, the record navigation is confusing and I've started moving the Record Navigation controls to the top of the forms to improve that. I'm stuck on the 'n of n' field, is there a generic property(s)/query that will give me this?
...
In MS Access reports, page counts can be displayed using a text box with the following:
= "Page " & Page & " of " & Pages & " Pages"
However, this is problematic for large reports, as Access cannot open the first page of the report in Preview until ALL pages have been formatted (so it knows the total number of pages).
Ideally, in Pre...
Hello guys,
I am currently developing a database via MS Access 2003 and got stuck at a circular reference problem. Basically, it comes down to the following relationship triangle (it is a simplified form of my relationship table):
Positions
oo oo
/ \
...
Hi, I am attempting to convert an access cross tab query to SQL, and am hoping someone here can help me in the process.
The access query is:
TRANSFORM First(tbl_Proj_Budget.BUGDET_LINE_BURDENED_COST) AS FirstOfBUGDET_LINE_BURDENED_COST
SELECT tbl_Proj_Budget.PROJ_ID, First(tbl_Proj_Budget.BUSDET_LINE_BURDENED_COST) AS [Total Of BUGDE...
I want to write the following (pseudo) SQL statement in MS Access:
Select C
from MyTable
where (A, B) IN (select distinct A,B from MyTable);
I tried that but got the complaint "You have written a subquery that can return more than one field without using the EXISTS reserved word in the main query's FROM clause."
I appreciate any fee...
I'm trying to write a macro to export a single row from a single worksheet from an Excel 2003 workbook to a new row in an Access 2003 table. I'm new to VBA, and everything I've found on the web refers to going the other way -- from Access to Excel. I want this to be an export, not a link, and I don't care about keeping them synced afte...
I would like to show all the usernames who have interacted with a bug in MS Access. I do not understand how to reference the same Users.UserName field 3 times in my select statement?
Here are my tables
--------------------------------------------
Table 'Bugs'
--------------------------------------------
BugID OpendBy ClosedBy ...
I'm trying to insert a System.DateTime into an Access database using a parameterized OleDbCommand in C#. However, it throws a Data type mismatch in criteria expression exception.
Here is my code:
string statement = "INSERT INTO Log (SCTID, LogDateTime, Type, Message, Visible)" +
"VALUES (?, ?, ?, ?, ?);";
OleDbCommand insertComman...
I am writing my first little Access 2003 application. I have two queries that I cannot figure out how to combine. What I am looking for is to get all the routes numbers in a date range, count the total rows per route in the date range, and count how many were late. I have these two queries that get me part of the way there, just can't ...
Hey guys, I'm just doin' practise Program to read,write data to Access DB in C# and i'm having a problem in writing data to Access DB though i'm able to read data i.e fetchin' is working fine but when i insert data my "ExecuteNonQuery" is working fine i mean without ne error but when open the Access DB the data is not there.... here is t...
I have two tables where one contains author deatils and the other article details. One author may have many articles. In the article table is a field entitled "Decision"
The decision field can be "Accepted" or "Rejected". I want a query to output a table of author name and ID followed by a count of their number of submissions, accepts a...
Query:
SELECT StartDate, EndDate, RIGHT(Sector, 1 )
FROM Table1
ORDER BY Right(Sector, 1), StartDate
By looking at this, the query should order everything by sector, followed by the start date. This query has worked for quiet awhile until yesterday where it did not order it properly, for some reason, Sector 2 came before Sector 1.
Th...
Such a simple question, but I cannot find the answer (Google, MS help, SO):
How can I check by VBA whether an unbound checkbox @ a Access form is checked by the user or not? Can't find the right property.
Thanks in advance.
UPDATE:
I use this code after the suggestions of @HansUp and @RC:
Private Sub CmdTest_Click()
MsgBox "Check1...
I would like to create an Access report in which the record source is created via ADO code and then set as the record source for the report when the report is run. The problem I am running into is how to add fields to the report since the recordset is bound to the report at run-time and not design time. Is there way I can manually add t...