ms-access

How do I get a single file name out of a File Dialog object in VBA (for MS Access 2007)?

How do I change my code to get the file name instead of the directory name? openDialog.InitialFilename gives me the directory name. openDialog.FileName gives me the error "Method or data member not found". Private Sub btnEditPhoto_Click() If (txtImageName > "") Then Application.FollowHyperlink txtImageName Else ...

unable to remove password from Microsoft Access 2007 (accdb)

I have a Microsoft Access 2007 (accdb) file. I set a password on it. When I open it up now, I am prompted for a password. I enter the correct password and I can gain access to it. However, I want to remove the password. I click "Database tools", but in the database tools, I only see "Encrypt with password", contrary to the help file...

Autofill a subform field from a main form field

I have a form with two subforms, both of which are continuous. Each form has a field to accept the name of the person who created the record. Almost every time, the same person will be creating all of the records, so it would be really convenient if the fields would autofill once the main record has been set. I've tried several approa...

VBA Access Specify Field Format for a Date/Time Field

I am having issues with changing the Field Format of a existing Data/Time Field. I want to add a field called "Duration" to a table called "IncidentData" and change the field to show only the hour and minutes information such as "13:44" ...

How do I group by min value in one field of table, keeping all the values from that same row?

I have a table like this: Field1 | Field2 | Field3 1 | 1 | 22 1 | 2 | 10 2 | 5 | 40 2 | 2 | 55 I want to group by Field1, and then take the values from the rest of the row with the minimal Field2, eg: Field1 | Field2 | Field3 1 | 1 | 22 2 | 2 | 55 Note that this is not the...

Is it possible to consume a WCF service in MS Access?

We are thinking about centralising some or all of our data access. I thought a good way to do this would be via WCF. However, lots of our applications are built in MS Access (a whole other story!). So, is it possible to consume a WCF service in MS Access? I know consuming web services is possible (although I don't know the details). Is...

New to programming

I have a form (Quote) with an auto-number ID, on the form at the moment are two subforms that show different items (sub 1 shows partition modules sub 2 shows partition abutments) both forms use the same parts tables to build them. Both forms are linked to the quote form using the ID. All works well until the forms is refreshed or re-lo...

Access query to Excel spreadsheet

In an Access database I have a query table that is linked to a form when the form is opened and edited. How can I link this query table to Excel so the when I click a button on the form in Access the spreadsheet in Excel is opened showing all items in the Access query table, the user can then edit the spreadsheet if required. All in Ac...

Accessing tables from different .mdb files

I need to show a grid of saved projects (compare "orders") in a datagrid, where the projects are saved in an Access 2000 database with a similar schema as follows: ID Name Country_ID Plant_Type 1 'Test' 1 1 2 'Second' 2 2 Let's call the file "Projects.mdb". This is then showed in the data...

Why does Form_Load event occur on mdb shutdown?

When I close my mdb the Form_Load event for my MasterMenu form (which is open at the time of application shutdown) is being triggered. This causes unwanted processing to happen. Once the processing begins, I cannot interrupt the process to debug. I tried stepping through the code by typing F8 on the line: Application.Quit, but it exec...

Link table in Access database to Bluetooth device list

I have a Bluetooth enabled Laptop & I have 2 Bluetooth enabled mobiles named as AX1 & AY1 My Laptop display these mobiles in main window of Bluetooth as follows AX1 AY1 I am aware that Bluetooth has device list(a data list like table) & the same is dispayed in main window(like a form). My question is how to link this device list in my ...

Microsoft Access 2003 - creating a separate field that totals 5 other fields from the table.

This is what i have so far in the SQL code........ SELECT DISTINCTROW [OEE/A Query].Press, Sum([OEE/A Query].[SumOfLabor Hours]) AS [Sum Of SumOfLabor Hours], Sum([OEE/A Query].[SumOfGood Pieces]) AS [Sum Of SumOfGood Pieces], Sum([OEE/A Query].[Scrap Pieces]) AS [SumOfScrap Pieces], Sum([OEE/A Query].[SumOfMachine Hours]) AS [SumOf...

How to search subform and use data to add record in another subform

I have a main form INVOICE with subform INVOICEDETAIL(ITEMID, InvoiceID, Quantity, Price) and subform ALLITEMS (primary key ITEMID and subform readonly). INVOICE is linked to INVOICEDETAIL via the InvoiceID field while INVOICE is not linked to ALLITEMS thus all items shows in ALLITEMS. I want user to be able to double click items on AL...

Access mdb file content from .net when mdb file has password.

I am creating a window application in C# and was thinking of setting up a password on mdb file of MS-Access so that no one can open that file other than my window application or who so ever knows password of that file. I managed to make that file password protected but unfortunately I was not able to access that file through my applica...

Microsoft Access 2003 - Laying out code correctly.

SELECT DISTINCTROW [OEE/A Query].Press, Sum([OEE/A Query].[SumOfLabor Hours]) AS [Sum Of SumOfLabor Hours], Sum([OEE/A Query].[SumOfGood Pieces]) AS [Sum Of SumOfGood Pieces], Sum([OEE/A Query].[Scrap Pieces]) AS [SumOfScrap Pieces], Sum([OEE/A Query].[SumOfMachine Hours]) AS [SumOfSumOfMachine Hours], Sum([OEE/A Query].[Total Parts Hour...

MS-Access 07 works the same way as MS-Access 03 on different machines or need installation ?

I m creating a window application using MS-Access as my database since data volume is not large. I want to create it in accdb format i.e office 2007 then will it work with my application on any machine where there is no MS Office as mdb works on any machine. ...

How do i delete a foreign key constraint programmatically in Microsoft Access

How do i delete a foreign key constraint programmatically in Microsoft Access, preferable using SQL. For starters i don't know how to find the name of the foreign key. I connect to Access from a Java application using the JDBC-ODBC bridge. I want to execute the SQL from my Java application. I can see the relationship in Access, in the ...

MS Access: programmatically rename columns

I need to update all column names in an Access database of 8 tables. In short, each underscore in a column name should be replaced with a space. Can you recommend a fast method for doing this? ...

access report from dynamic crosstab query and vba to "manually" generate reports

I have come across the problem of generating complex access reports (by complex I mean with data processing, variable number of fields, among others). Let me explain in deeper detail some of the things I need to implement: Some fields should not show according to some values in a query If a certain record does not exist, a nice colo...

Access - Merge two databases with identical structure

I would like to write a query that merges two Access 2000 databases into one. Each has 35 tables with identical fields and mostly unique data. There are some rows which will have the same "primary key" in which case the row from database A should always take precedence over database B. I use quotes around "primary key" because the databa...