ms-access

VB Mismatch Error

I keep getting a mismatch error for this line: UPDATE tblLunchTime SET [End] = '06/28/2010 9:41:34 AM' WHERE Start = '06/28/2010 9:41:31 AM' Does anyone know why? EDIT: Rest of the code added. 'Save end time in database. Dim strValuesQuery As String strValuesQuery = _ "UPDATE tblLunchTime " & _ "SET [End] = '" & Now & "' " ...

Why do I have to use DISTINCT for this to work?

Hi, here's my problem: I have an SQL query that makes 4 calls to a lookup table to return their values from a list of combinations in another table. I finally got this working, and for some reason, when I run the query without DISTINCT, I get a ton of data back, so I'm guessing that I'm either missing something or not doing this correctl...

Why can't I use "CompactDatabase" in DAO.DBEngine.36 using VBscript?

Hello, I'm trying to make a small VBScript that compacts a MS Access 2007 database file. The code I have is: Set acc2007 = CreateObject("DAO.DBEngine.36") acc2007.CompactDatabase "C:\test.accdb", "C:\test2.accdb", Nothing, Nothing, ";pwd=test" Set acc2007 = Nothing I'm getting this error when I run the three lines with "cscript test.v...

compare excel and access to update data

Hi All, I am using Remou trick shown here... to compare excel data with access table to update changes. Is there a way to have excel to update any new data found using the same batch technique. Also can I incorporate it in the below mentioned code in any way. Sub UpdateMDB() Dim cn As Object Dim rs As Object strFile = Workbooks(1).F...

Access DB - Multiple Time/Date for one ID

I'm creating a small db for a non-profit where volunteers drive disabled/elderly citizens to different locations around the area. They currently use Excel sheets to update everything manually and want to move to something more streamlined. I have one table of drivers that has all their information, however there is a field that requires ...

Having users enter registration keys in Microsoft Access.

Hey everyone! So my issue is that I want to have users enter their registration keys to a software into an Access table. There are five parts to the registration key. How can I take these 5 boxes and format them to one column in the database? (In Form: [_______] - [_______] - [_______] - [_______] - [_______] In Database: "_______ -...

Can I link an MS Access Application to Postgre SQL on a Linux Server? Can / Should I use ODBC?

I write MS Access / VB / SQL Applications, customized. One of my clients has a truly massive Access application I wrote them, and their number of active users have just expanded to over 15. Running into more data corruption issues, I am recommending they port to an SQL backend for stability. (Of course). They would prefer to invest in a...

MS Access 2003/2007 - Subform as control panel, closing parent form with global like reference??

I am sorry if the title is wrong, but I think that is what I mean to ask. So I have a subform created that I would like to use, sort of like a control panel, that allows user to select a range of different forms. So the same subform ends up in a lot of different parent forms. I would like to use simple docmd.close acform but i am lo...

inserting into an updateable query

I'm using Access 2000, I have a form bound to an updateable query on two tables. Here's a simplified version of the query: SELECT tblA.ID AS MainID, tblB.ID, tblA.ItemX, tblB.ItemY FROM tblA INNER JOIN tblB ON tblA.ID = tblB.ID; Column tblA.ID is type "autonumber" and is the primary key. Column tblB.ID is long integer, has a unique i...

How to show datagrid in ms access forms

Hi , I have to create a ms access form which has a text box and a button. I want to retrieve multiple records from db and show all those rows in ms access Form on click of the button.is there a way to show multiple records on a ms access form something like a datagrid and once i retrieve those records I should be able to update them.Ple...

The difference between using an OLE Object and an Attachment in Access 2007?

I'm learning Access 2007, and among the list of data types are the OLE Object and the Attachment. The text has this to say about Attachments: You can use attachments to store several files, and even different types of files, in a single field. The Attachment field is new for Access 2007 and stores data files more efficient...

MONTH IN MS ACCESS

Hi When executing the code , Datatype mismatch Error is showing .Can tell if i need only Month(either as January,February.. or as 1 ,2,...12) as a field in MS Access database what should i give as data type. Thanks for your answer.One more query: if (rs6("TotalDays")+ tdays) > rs5("Sing") then Is there any syntax error in this statem...

How to find words in a memo field with microsoft access

Hi This is more complex than I thought as I need to do it with VBA. So here is my problem:- I have two tables in an MS Access DB, content and adjectives. The content table has over 5,000 text snippet rows in a memo field (content) and a blank text field (adjective). The adjectives table has 120 adjectives with the field (adjective)....

MS Access form field display format

Hi all We are working on an application using MS Acces 2003 and SQL Server 2005. We are saving a fields that contain a text data for example 002215.28 but we want to display it on the screen in a special format for example like this 00 22 15.28. To do so on the Form Design toolbar and in the Format property box, we type a custom forma...

Un-escaping characters present in recordset that is bound to control in Access 2003

I have some data stored in SQL Server that contains apostrophes. Within the SQL Server table to apostrophe is escaped. For example the phrase "Roberts's thesis" is stored as "Robert''s Thesis". I use Access 2003 as a font end for the application and I use ADO to access the data stored in SQL Server using Stored Procedures. The issue I a...

How do i insert a row in to access using c#

I am very new to c# and all I want to do to start off with in insert a row into an access database. I am using Microsoft Visual C# express 2010, I have added a dataset an am unsure of where to go from here... I have had a look on google etc.. and nothing worked for me :( I have been trying with this code: DataRow newCustomers...

Proper way to close ADO recordset in Access when passing to calling method?

I am using Access 2003 to access data stored in a SQL Server database via ADO. Most often I obtain the data using stored procedures. I execute the stored procedures via ADO in a separate function that returns a recordset. When returning a recordset from a function where is the best place to close the recordset and release it's hold on me...

MS Access 2003/2007 - Chart Object on a sub form, not loading when parent forms load

SO I have a subform, that simply has one chart object on it. Its small, and this is the only purpose of this sub. Then I have about 10 forms that each have a sub windows with this form as it's child. I use a UNION query to show the current balance of 10 accounts on each form with this chart for comparative purposes. Everything works fine...

Access 2007 Macro Designer - Get and reuse parameter from user

I have a simple Access macro that opens two forms and filters them based on input from the user. I used parameter queries to accomplish this, so my Where condition for both reports reads: [PONumber]=[Enter PO Number] As it currently stands, an input box pops up twice - once for each report. I was hoping that I could somehow re-use t...

Filters in Queries

I have 4 total queries and 3 separate queries that get budget information from a budget table and a account number table, which go into the 4 query. For the query named bud11 I have some accounts that are not in the other 2 queries (bud10 and actvproj). When I run bud11 by itself, all the accounts I need, show up. But when I run the 4th ...