Search results

  1. M

    Application defined or object defined error '2465'

    Thanks, everything works now! Quick question... Do you think it's a bad idea to include this many subform on a single form? Do you think it might take a very long time to load when the database will get larger? We should be upgraded on Office 2016 soon, not sure if that's important...
  2. M

    Application defined or object defined error '2465'

    I can get the form to open. I get an error message and the Forms!frm_combined_CNVs.frm_sample_cnv1.Form.Filter = Criteria1 is highlighter. I also tried this method without success: DoCmd.OpenForm "frm_combined_CNVs", , , "Forms!frm_combined_CNVs.frm_sample_cnv1.Form.[sample_id] = '" &...
  3. M

    Application defined or object defined error '2465'

    Hello, I'm trying to filter a 'single form' sub-form when the main form opens. I need the sub-form to show a participial record that is dictated by the filter criteria. The Main form opens but I get an error message and filter fails. Note: both sample_id (primary key) and run_name are strings...
  4. M

    where clause is not working in Union query

    Got it! Thanks
  5. M

    where clause is not working in Union query

    Changing 0 to "(All)" worked. However, when I add more fields to select to the query I get and error: "The number of columns in the two selected tables or queries of a union query do not match." How can it be? I'm only using one table for this. Thanks SELECT tbl_Samples.sample_id...
  6. M

    Combining Filters

    Great! There is a continuous form “Project” that has a button next to each record. The click of a button lunches the Main form with subform. The filter code is in the click event of that button. The “Project” form will remain open until the “Main” form is closed.
  7. M

    Combining Filters

    I understand that I can combine filters, however, I want to clear the combobox filter each time the user selects an item from a combobox. Let's say that the first filter (not dependent of the combobox selection) is a contant filter that I will always apply to the form and the combobox filter...
  8. M

    Combining Filters

    This approach will only works the first time the user selects a sample from a combobox. When the user selects another sample, both the first sample and the second samples will be combined in the search criteria and the filter will fail. Perhaps, the best way to do this is to add a public...
  9. M

    Combining Filters

    I forgot to mention that the two forms are not linked, but the Current Form event of the subform filters the Main form. I’m interesting in filtering the subform that is filtered independently from main form. Sorry, I'm not understanding how to combine the two filters that are designed to...
  10. M

    Combining Filters

    Hello, I apply a complex filter to a continuous subform when the main form opens. On that subform there is a combobox that user can use use to filter data further. Is there a way to preserve the first filter and add addition filter (input from the combobox)? Do I need to combine the two...
  11. M

    where clause is not working in Union query

    Yes, but it should be displayed as (all) not 0.
  12. M

    where clause is not working in Union query

    It worked when I added the same where clause to both statements, however, it shows "0" as a choice intead of "All". Any idea why? Thanks
  13. M

    where clause is not working in Union query

    I'm trying to add "All" option to a combobox and encountering difficulties with 'Where' clause of a UNION query. Please suggest how to correct the following SQL: SELECT Distinct tbl_Samples.sample_name, tbl_Samples.run_name FROM tbl_Samples UNION Select 0 as AllChoice, "(All)" as Bogus from...
  14. M

    Error: “primary key not found” of Child form when loading Parent form

    Would it help if I uploaded the database? Thanks
  15. M

    Error: “primary key not found” of Child form when loading Parent form

    Me.Parent.RecordSource = qry is referring to middle form "frm_report_comments". It is the parent form of "frm_report_variants" but not the highest level parent form "frm_sample_report". "Form Current" code is fired from the child form so I refer to middle form as Me.Parent and change it's...
  16. M

    Hi, Hello, You are always very helpful and knowledgeable. Could you please help answering...

    Hi, Hello, You are always very helpful and knowledgeable. Could you please help answering the following question? Thank you very much, Mila http://www.access-programmers.co.uk/forums/showthread.php?p=1503519#post1503519
  17. M

    Error: “primary key not found” of Child form when loading Parent form

    I suppressed the error message, however, the child form doesn't load with anything when parent form opens. I would like the child form to load based on the first item of the combobox on the Parent form. Please see the screenshot in the original post. The latest code is the Current event of the...
  18. M

    Error: “primary key not found” of Child form when loading Parent form

    I think the Current event of the Child form is causing the error. It fires before the form record source updates and returns a null value. That's why I put IsNull(Me.txt_variantID.Value) to avoid the error message. However, now the child form doesn't load when Parent form opens. It does...
  19. M

    Error: “primary key not found” of Child form when loading Parent form

    Hello, Form “frm_sample_report” is the main unbound form. It has a combobox “cmbSamples” that holds all sample names for a project indicated in “txt_Run_Name” text box. “frm_report_comments” is the middle form that has a bound subform “frm_report_variants”. These two forms are not linked...
  20. M

    How to pass a variable to filter statement

    Hello, I'm using the following loop to filter multiple subforms on a Main_form: strform = "frm_subform" For j = 0 To 2 Debug.Print sample_array(j) y = j + 1 c = CStr(y) Debug.Print c numbered_form = strform & c 'corresponds to the name of each...
Back
Top Bottom