Search results

  1. P

    Dlookup with multiple criteria

    Dear All, I would like to use dlookup with 2 criteria I don't want to concatenate these two criteria, I would like to evaluate them together Here is my function in VBA: Me.profitcombo = DLookup("[profitratiorank]", "[tbl_annualdata]", "[YearData] = " & Me.yearcombo And "[Custname] = '" &...
  2. P

    Formula results in #Error sometimes, how to replace those?

    Dear All, I have a formula in a field of a query like: A/B (A and B are both expressions) In some cases A or B or both are 0, in that case the formula results in #Error I tried Iserror(A/B) but still I get the #Error result instead of a True/False result... Could you please advise how I can...
  3. P

    Opening embedded object in VBA

    I got the solution: controlname.Verb = acOLEVerbShow controlname.Action = acOLEActivate This code opens the specified OLE object!
  4. P

    Opening embedded object in VBA

    Dear All, I inserted a Word file into a form as an unbound object If I doubleclick on it in Design view the file opens, no problem My problem is that I have a button, and I would like to use the button to open the Word file embedded Could you please advise? Many thanks in advance
  5. P

    Error message: Update or CancelUpdate without Addnew or Edit

    In the meantime I figured out a solution The problem was that upon opening the second form a VBA was run to jump to the same record where the first form was (recordsetclone bookmark method was used) After replacing that code with a DoCmd.OpenForm command, using its Where condition the error is...
  6. P

    Textbox bound to SQL?

    I did what you sugegsted and it works fine now! Many thanks!
  7. P

    Form jump to a record where another form is

    Many thanks, it works perfectly!!
  8. P

    Textbox bound to SQL?

    I modified it a bit as you recommended: SELECT Avg([Result]/[turnover]) AS Expr1 FROM tbl_AnnualData WHERE (((tbl_AnnualData.CustName)=[forms].[frm_main].[custname]) AND ((tbl_AnnualData.YearData)=DMax('" & [YearData] & "','" & [tbl_annualdata] & "') Or (tbl_AnnualData.YearData)=DMax('" &...
  9. P

    Form jump to a record where another form is

    Dear All, I have 2 forms, both are bound to the same table, but with different fields How can I achieve that if I click on the second form (OnActivate I assume) it displays the record that is displayed in the first form? Many thanks in advance
  10. P

    Error message: Update or CancelUpdate without Addnew or Edit

    Dear All, I have a really big problem with a form It contains checkboxes, each is bound to a Yes/No field After ticking these checkboxes I click on another form that is also open, and when I click back on the previous form, the ticks from the checkboxes are gone! And if I would like to recheck...
  11. P

    Textbox bound to SQL?

    This should work but when I use the below code I get an error message: "Expected end of statement" for the SQL part Could you please help? Dim rs As DAO.Recordset Dim strSQL As String strSQL = "SELECT Avg([Result]/[turnover]) AS Expr1 FROM tbl_AnnualData WHERE...
  12. P

    Textbox bound to SQL?

    Could you please specify how I can set the value of the textbox in VBA or with the other method you mentioned? (I know basic VBA but I dont know how I can set the value as SQL) Thank you
  13. P

    Textbox bound to SQL?

    Dear All, Is it possible (and if yes how) in Access to have a textbox that displays the result of an SQL string? (the result is one field only) I tried it with a combobox and it works fine, the only problem is that I have to select the value manually from the dropdown list So an alternative...
  14. P

    Max of multiple columns

    Woow! It works perfectly! Thank you very much for your help, I really appreciate it!
  15. P

    Max of multiple columns

    Yes, that is exactly what I would like to do, but I dont know how Anyone could please help? Many thanks
  16. P

    Max of multiple columns

    Dear All, I have a table with 4 fields and I would like to insert a fifth field that would calculate the max for each record (so the max value of the 4 fields) Eg. Field1---Field2---Field3---Field4----Newfield 2---------3-------4--------1---------4 5---------6--------5--------2--------6...
  17. P

    Subforms autoupdate

    It works perfectly!! Thank you very much!
  18. P

    Max of more fields

    OK, how should I fix that? (btw these are records, I just need to do that calculation with them somehow) Thank you
  19. P

    Subforms autoupdate

    How can I requery them? I have more because the main form is tiled to segments and each segment needs to have different fields displayed from the annual data table (which is displayed through subforms) So basically I could display all fields in one subform, but because there are different parts...
  20. P

    Subforms autoupdate

    The data source of the main form (simple form) is a table containing master data while the data source of the subforms is a table containing annual data that needs to be appended continuously, so it is displayed as subforms The two tables are linked by child and parent fields So the problem is...
Back
Top Bottom