Search results

  1. T

    Delete records with Null values

    Hi, I would like to make a listbox that on double click will delete the concerning record. . This works fine for records with both a value for [FoodEx1_hier_cd] and for [Ingredient], but it does not work for records with a Null value for [Ingredient]. THis is the code: If...
  2. T

    Not updateable subform

    Hi, I have a form with a unbound combo box (Natcd) and a subform (Missing Proportion% subform). The form and subform are linked with Natcd (master) and [Ingredient name] (child). The record source of the subform is table Foodcomposition. The subform is a continuous form. The fields on the...
  3. T

    Data type mismatch in criteria expression

    Hi, I have a data type mismatch in criteria expression with the following code: Dim SQL As String Dim db As DAO.Database Dim varItem As Variant Set db = CurrentDb() Dim i As Integer For i = 0 To Me.ListSelectedNatcd.ListCount - 1 Me.ListSelectedNatcd.Selected(i) = True Next i For Each...
  4. T

    Overwrite records if exists

    Hi, I have a code that will put values from several unbound textboxes and two listboxes into a table 'dbo_residunorm_nieuw' for all the selected records in the listboxes 'ListStoffen2' and 'ListKAPprodukten'. The code below works fine, but now I would like to add this: If the selected records...
  5. T

    Select all records when a field is null

    Hi, I have a subform and when field [Status] is Null I would like to append all records from table melding. I have some trouble with the criteria... Does anybody understand why this does not work in an append query: WHERE (((melding.status)=IIf([Forms]![Versie keuze]![Versiebeheer...
  6. T

    Question Export filtered pivot table into Excel

    Hi, I would like to export a filtered pivot table (Access 2010) into Excel 2010. I do not want to export all the data in dataview, as is done with the 'Export to Excel'-button. So, for instance, for this pivot table-selection: I would like to have this result in Excel: How should I...
  7. T

    String comparision in selection

    Hello, I have a string "buildingHierarchyCode" with values as: Z0001 Z0001.0001 Z0001.0002 Z0002 Z0002.0001 Z0002.0002 In a first combobox (called Niveau1) I can make a selection from values with a lenght of 5 characters in buildingHierarchyCode and I have a second combobox (Niveau2) with...
  8. T

    GotoRecord determined by several values

    Hi, I am trying to go to a specific record on a form. This is de code I use as event procedure of a button: DoCmd.GoToRecord acActiveDataObject, , acGoTo, "EU_psu_nr = " & Me.ZEU_psu_nr And "EU_pdg_nr = " & Me.ZEU_pdg_nr And "EU_psg_nr = " & Me.ZEU_psg_nr And "EU_pro_nr = " & Me.ZEU_pro_nr...
  9. T

    Delete records with null values

    Hi, I am trying to delete a selected record with the following code: Private Sub BtDelRecord_Click() On Error GoTo Err_cmdSaveRecord_Click Dim strSQL As String strSQL = "DELETE * FROM [dbo_Conversie_lokatie] WHERE [dbo_Conversie_lokatie].[CONVERSIEPROG_NAAM] = '" & Me![Listbox].Column(0) &...
  10. T

    Distinct count of records

    Hi, I am trying to make a distinct count of records from a dataset that is generated by the following code: sSql = "SELECT * FROM [Leverantie vs meetgegevens] WHERE [Leverantie vs meetgegevens].lev_id = " & CbLeverantie.Column(0) & " ORDER BY bmp_id, methode;" [SF Leverantie...
  11. T

    Multiselect listbox to add records to a table

    Hi, I have a form with an multiselect listbox (ListKAPprodukten), a textbox (TBvor_id) and a Command button. On click of the command button, I want to add the selected items of the listbox and the value of the textbox to a table (dbo_residunorm_nieuw), that is shown in a subform. I found on...
  12. T

    Compile/Syntax error in notation of VBcode

    Hi, I am trying to set a value (vor_id) by using a select-statement: Form_22BeherenResidunormen.vor_id = select dbo_verontreiniging.vor_id FROM dbo_verontreiniging WHERE dbo_verontreiniging.sto_id = " & CurrentStof & " I get the following message: "Compile error. Expected: expression". I...
Back
Top Bottom