ms-access

Table/Form design; Record/user has Multiple addresses, selected the address that is the contact

Hi there, Looking for advice as to the correct method of solving this design issue I have a table for a profile / record (tblProfile), each profile can have more than one address / property (tblProp) I have a form for adding a profile, and a seperate form to add an address. What would be the correct method for allowing the selection o...

MS ACCESS how to accesses a Query instead of a Table

how can l do that "Create a Form and save as “Sales by Branch and Category” which accept two parameters,Restaurant and Category, and display results showing Branch, Category, Description, Date,Quantity, Price and Total Sales as defined by the query “Sales by Branch and Category”. That is to create a Form that accesses a Query instead of ...

MS-Access front-end does not recognise dates from SQL Server

I have a SQL Server 2008 database with an Access front-end. My problem is that Access does not recognise SQL Server's dates as they are in a different format. SQL Server-s format is YYYY-MM-DD Access' format is DD-MM-YYYY When the date is displayed in a text-box, it is displayed as a string (without the little calendar icon next to it)...

Adding to Access combobox that is based on table/query

I have an Access 2003 database that makes use of a combobox that contains a list of possible status codes. The codes are derived from a table and a stored procedure is used to return them as a recordset which is assigned to the combobox via code. The problem I am running into is how to add an additional status "ALL" to the combobox progr...

One (probably unbound) Access 2003 form to create multiple records.

I've been recruited to work on a form for tracking specimens. Each specimen is associated with a subject; each specimen also has a particular slot in a 9 x 9 storage box. For ease of data entry, I think it would be best if the Access form mirrored the box itself (and the paper forms that will be used to enter data into Access): nine co...

Access Query Stops working

I have this Access database that we use to run reports. The report is ran twice a day every working day. For some reason the report will run fine usually in the morning but every now and then it will stop working. I go to debug and it will show a different query failed to run every time. So far there are two ways to fix this. Close the a...

connecting to access data base and write to table

I have an excel invoice sheet and I want to write the information from the invoice to a table in an Access file. My following code is: Private Sub Button66_Click() Dim con As New ADODB.Connection Dim connectionString As String Dim sql As String connectionString = "DBQ=c:\Users\Public\Public Desktop\InvoiceRecords.mdb; Driver={Microsof...

How do I change the "Indexed: Yes (No Duplicates)" constraint in Access to "Indexed: No" via SQL?

I need to change a column in MS Access from indexed to non-indexed. I need to do this via SQL because I do not have direct access to the database. I only have access to it via SQL. How do I do this? ...

ASP.NET: accessdb odbc - when getting an exception, how can i see the full stack trace?

Hello. Using ASP.NET as programming language on IIS Server. the Database is access and i connect to the database using ODBC. when i fill some form in the website and press submit i get an exception: Server Error in '/' Application. Description: An unhandled exception occurred during the execution of the current web request. Please re...

vba format function throws type mismatch error

I am trying to format a number as currency in Access VBA. In the immediate window, when I enter: ? Format(123, "Currency") I get the expected response: "$123.00" However, in the code window, when I enter: Debug.Print Format(123, "Currency") I get an error pointing to that line: "Run-time error '13': Type mismatch" Why does the s...

Inserting a foreign key. Excel VBA and MS Access 2003

Hi, I have two tables: Department(Dept_ID,Dept_Name). and table Employee(Empl_ID, Empl_Name,Salary,Dept_ID). The IDs are auto-numbers. Dept_ID in table Employee is a foreign key refering to Dept_ID in Table Department. Now, I want to insert a record to table Employee using Excel VBA which is connected to Access 2003 database where my ta...

MS Access data export performance is horrible

Hello, I'm using Access 2007. I have a query that accesses a table with a few hundred thousand records in it, which I am joining to another table via an inner join based on two fields. The joining fields are indexed in both tables, and the sort column is also indexed. When I run the query straight up, the result set opens up in about...

Access 2007, Need to distribute a form while keeping the database on a server.

So here is the gig, I have this inventory access database that I am trying to seperate the form logic from the database itself; having the database on the server while the form is distributed to users. I know how to seperate the database to a "front end" and a "back end" but my question becomes " is that all I need to do? Send the user...

JET SQL Performance/ SQL Understanding

This is not a problem that needs answering, more of a query on why this is happening. I have a field in one table that is populated with 'Y' Or 'N', and i have a query that simply takes the value of that field and pops into another table The table has approximately 25,000 records in it The query below takes about 25 seconds to run UP...

What is causing my access database to be so slow?

Just to clarify it's not actually my database and I didn't choose access, I'm just helping a company out by developing some of their already implemented access database. Anyway, on some of their forms the forms open and run extremely slowly for no apparent reason. There is one form which takes a long long time to open on everyone's comp...

Avoid duplication without using Indexed fields and 'no duplication'

Hi there, I'm looking for advice as to the correct method for form design to prompt the user entering data to avoid duplicated records. For example: The user enters profile information in the fields firstName surName Its highly possible for numerous profiles to have the same name (e.g John Smith, so indexing fields isn't possible to av...

Compile Error in VBA code in MS Access

I have the following function in access, which was working fairly well. But now suddenly i am starting to get a compile error : Method or data member not found Function Serialize(qryname As String, keyname As String, keyvalue) As Long Dim dbs As Database Dim rs As Recordset Set dbs = CurrentDb On Error GoTo Err_Serialize Set rs = dbs.O...

Bind DataGridView To Results of Access SQL Query String

I would like to bind a DataGridView to the results of a query generated as text at runtime. How can I send a query as text to Microsoft Access and bind the results to the DataGridView? When the user clicks the button (ok_btn), I want the contents of the textbox (query_txt.Text) sent to Microsoft Access, then I want the results of the q...

compact access database

I have a 1gig access database, is there some sort of formula that gives a time frame for compacting an acccess db. I understand that it relays a lot on hardware, but assuming all things are equal is there some sort of way to know if 1gig will take 1hour or 20 minutes to compact? thank you ...

import related tables from Access into SQL Server 2008

In SQL Server 2008 I had remade the database structure similar to Access. I need to import a couple of related tables but I am worried that the foreign keys won't match with the autonumber fields from the related tables. ...