ms-access-2010

Access VBA - Launch password protected database and close existing one

让人想犯罪 __ 提交于 2019-12-08 04:19:26
I am trying to set up a "Launcher" database which contains vba code that will open a second database which is password protected. (I can then convert the launcher db to accde so the VBA containing the password cannot be read) I have the following code so far... Private Sub Form_Load() Dim acc As Access.Application Dim db As DAO.Database Dim strDbName As String strDbName = "C:\database Folder\secureDB.accdb" Set acc = New Access.Application acc.Visible = True Set db = acc.DBEngine.OpenDatabase(strDbName, False, False, ";PWD=swordfish") acc.OpenCurrentDatabase (strDbName) Application.Quit End

ms access query joining two tables

♀尐吖头ヾ 提交于 2019-12-08 04:13:23
问题 I have two tables that need to be output into an un-editable form. I need the syntax for the query. TableOne has fields id, customer_id, date, type_id. TableTwo has fields type_id, type_name. I have: SELECT * FROM TableOne WHERE customer_id=someVariable But it just outputs a number for type_id. I need it to print out the type_name associated with the type_id instead of printing out the number. How do I change the syntax of the SQL to get it to do this? 回答1: just use LEFT JOIN or INNER JOIN

Adding Images into Forms from External Sources using Paths

允我心安 提交于 2019-12-08 03:24:15
问题 I've been searching around on Google to find a better way to show images in Access without actually inserting the image into the database. I found this article 'http://support.microsoft.com/kb/285820' via this thread 'Is there a way to get ms-access to display images from external files' which goes into great detail on how to set paths to pictures through folders/files, and it works great, for a 'set' picture. However, I want a different picture to display when I switch to a different record.

Design an Access Form with Dynamic SQL as Recordsource

爱⌒轻易说出口 提交于 2019-12-08 03:00:00
问题 I am pretty new to Access VBA programming. Here is one problem I have when creating a form in Access. I need to link the form's recordsource to a query object which I have already defined. Let's say I have field1, field2, field3, etc. in my query. The end product I would like to present is on top of the form, there are several text boxes for user to input filtering criteria of field1, field2, field3 ... and on a click of a button, a datasheet displays at the bottom of the form with the

How can I conditionally format textbox border on continuous form?

末鹿安然 提交于 2019-12-08 02:58:17
问题 In Access 2010, I have a continuous form, and I'd like to change certain properties of a 'cell', like border colour, based on values in another cell. I haven't found a way to do this in VBA, because it's a continuous form and changing the properties directly in VBA changes it for all records, not just the one I'm on. I assume I have to use some form of conditional formatting, but the conditional formatting GUI only allows me to set background colour, basic text formatting, and the Enabled

Convert Access 2010 accdb to 2007 accdb

心不动则不痛 提交于 2019-12-08 00:57:40
问题 I'm trying to convert an accdb file from use in Access 2010 to Access 2007. I first tried opening the file with Access 2007 and I get the error Unrecognized database format . I was able to get my backend to open in 2007 by removing the MSysResources table (which uses the new attachment datatype) but the same technique has not worked with my front end. My front end does use a webbrowser control (which Microsoft claims won't work but also won't stop the file form being opened). I thought I'd

How to increase performance for bulk INSERTs to ODBC linked tables in Access for multiple columns?

本秂侑毒 提交于 2019-12-08 00:44:44
问题 This question is based on on this one: How to increase performance for bulk INSERTs to ODBC linked tables in Access? I have further queston for the linked topic above, since I do not have enough score to comment on the topic, so I created my question here. With the excellent answer from Gord Thompson, who provided the following codes in the link above. Sub PtqTest() Dim cdb As DAO.Database, rst As DAO.Recordset Dim t0 As Single, i As Long, valueList As String, separator As String t0 = Timer

The database cannot be opened because the VBA project contained in it cannot be read

前提是你 提交于 2019-12-07 16:36:27
问题 This morning, I got this error Error accessing file. Network connection may be lost no matter what I was doing on any form. So I opened a blank database and imported everything. Some error occurred but it said that the import was successful. I was able to open my form again. Then I went back the old copy and then I got this error when I try to open the database The database cannot be opened because the VBA project contained in it cannot be read Even the backup I did before the first error is

Determine if Subform/Subreport Has a Form or a Report Loaded in MS Access

懵懂的女人 提交于 2019-12-07 16:29:37
问题 I have a Subform/Subreport control displayed on a Form in an Access 2010 database, and I use it to display both Forms and Reports. I have a few event handlers in which I need to know whether a Report is currently loaded into the Subform/Subreport control, or if it's a Form that's loaded. I have tried all of the following to no avail. Any of the following conditions If IsEmpty(NavigationSubform.Form) Then '... If IsNull(NavigationSubform.Form) Then '... If IsOject(NavigationSubform.Form) Then

Open a form using ID from a different form in Access 2010 using vba

若如初见. 提交于 2019-12-07 16:17:05
问题 I am trying to open a form from a button in another form. The form with the button,contracts_all form, has a field ID and I want to open up the form that contains the information with that ID. This second form,contracts, has additional information and has buttons that allow editing of that particular contract. I have managed to get something but it's giving me a 'Run -time error 2489. Form contracts not open' The code is below. Thanks in advance. Private Sub Command74_Click() ID = [Forms]