ms-access-2010

Access crashed on loading userform

白昼怎懂夜的黑 提交于 2020-01-05 05:53:49
问题 I have built my application but a problem has arisen that I cant get my head around - My application has no autoexec yet so I open access and double click on my userform to open it. On opening the userform Access crashes and closes However, if I first put the userform in design view, then open the form in form view it works fine. How can this be? It cant be the Form Load coding or it would still crash when going from design view to form view. I will include my form load coding in case: Me

How to enable filtering on a field defined by DLOOKUP()?

不羁的心 提交于 2020-01-05 05:35:11
问题 I have a form TForm based on table T , set up as a datasheet. My goal is to add a filterable column to the datasheet where the column's value is calculated from a query using another column's value. I tried to do this by adding a text box currentBox to T . The control source for currentBox is: =DLookUp("name","currentStatus","itemID=" & [ID]) where [ID] is a field in T and currentStatus is an aggregate query on a table that T is related to. I can filter on all the fields in TForm that are in

End of statement error

人盡茶涼 提交于 2020-01-05 04:39:05
问题 I am trying to assemble an insert statement with multiple line breaks. The insertion includes both numerical as well as textual data. I keep getting an error, and I cannot find the where I am syntactically wrong. Can anyone see me error? CurrentDb.Execute "INSERT INTO tblCustParts (CustPartNum,CustomerID,Alloy,Temper,Finish,FormType,Gauge,GaugeAimPlus,GaugeAimMinus," & _ "GaugeGuarPlus,GaugeGuarMinus,Width,WidthAimPlus,WidthAimMinus,WidthGuarPlus,WidthGuarMinus,Length,LengthAimPlus

Inserting every OTHER ROW from one table to another (VBA MS Access 2010)

穿精又带淫゛_ 提交于 2020-01-05 04:38:07
问题 I am working with manually created empty copy of table Products, which I named Products_Backup. What I want to do is to insert every other row from "Spices" category of products into this empty Products_Backup table, since there would be only 6 rows from total of 12 rows, that are in Products table under "Spices" category. The problem is that I don't know how to do that. I tried to use MOD operator for newly created ProductID, but my mentor told me that it is not a proper solution, since he

Cannot find the referenced form

我的未来我决定 提交于 2020-01-05 04:16:09
问题 When I click on the Create New Form button below, I get the following runtime error 2450 dialog box: When I click on the debug button, it gives me the following: The main form is called FindClientsNavigation. The "Create New Form" button in the ListOfForms subform is supposed to cause the NavigationSubForm to replace the ListOfForms form with a new CommunicationForm so that the user can enter information from a new form for the Client with the specific Client ID that is available in the

Query results not showing records with null values

帅比萌擦擦* 提交于 2020-01-04 01:22:07
问题 I'm designing a search form to search my access database based on 4 text fields, Firstname, Surname, Phonenumber and Promo Code. The queries look like: Like "*" & [Forms]![SearchF]![txtFirstName] & "*" Like "*" & [Forms]![SearchF]![txtSurnameName] & "*" Like "*" & [Forms]![SearchF]![txtPhone] & "*" Like "*" & [Forms]![SearchF]![txtPromo] & "*" The search should return all records if all the fields are blank. When you enter some values in the text boxes, the results are narrowed down to

iif (Iserror ()) function still returning #error

試著忘記壹切 提交于 2020-01-03 09:18:10
问题 I have the following function that creates a column in my query: MTD: IIf(IsError(FormatNumber([62xx]![F40])),0,FormatNumber([62xx]![F40])) This is linked to an Excel file and where people put numbers and text in the same column (F40 in this example). I need to know if the thing I am looking at is a number or text. If it's text I want a zero, if it is a number I want the number. I know that when I use FormatNumber([C107_62xx]![F40]) on a text line I get an error. I would assume when I get an

converting column names to use as row fields in Access

空扰寡人 提交于 2020-01-03 06:00:06
问题 I am importing sql into my Access database and am working on parsing the data into the correct tables and fields. I have run into an issue as my import creates column names and enters the values into the columns but the database uses those column names as row values and the values in a separate column Current table SC | DO | temp | pH | etc val|val | val |val | val table I am attempting to parse into Characteristic_Name | Result_Value SC | val DO | val temp | val pH | val etc. | val I have

Access VBA - Launch password protected database and close existing one

南笙酒味 提交于 2020-01-03 03:02:11
问题 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

Lookup and Relationship with multiple columns

北城余情 提交于 2020-01-01 19:39:16
问题 I am completely new to Access, but I've done the tutorials, and have some VBA experience with Excel, so I shouldn't be hopeless. I haven't progressed to forms yet, right now I'm focusing on getting the tables defined and populated, and relationships defined. I've changed the actual tables in the example here, but the context and problem hold. Table 1 is Food. Other than the autofield key, it has two fields FoodCat FoodType Fruit banana Fruit apple Fruit pear Meat lamb Meat beef Meet Chicken