Search results

  1. A

    Using table values to control form properties.

    You can use DLookup to find the value of a field in a table that is not open. Look in Help for more details. Declare a variable and set it to the results of the DLookup action. Then use the same code as before, but substitute the variable name for [YourField]. [This message has been edited by...
  2. A

    Using table values to control form properties.

    I don't know of a way to change multiple controls on a form without referring to each of them, so here is my suggestion: [YourForm].OnCurrent If [YourField] = Yes Then Me!Label1.backcolor = 16711680 Me!Label2.backcolor = 16711680 Me!Label3.backcolor = 16711680 Me!Label4.backcolor = 16711680...
  3. A

    Go To Record

    The record number is a dynamic indicator that will change with deletions or additions to your table, so you can't use it to regularly find records. You should have a field in your table that is a unique identifier, something like Project Number, that you should use instead. If you list that...
  4. A

    how to make combo box sensative to other combo box

    You would want to make the record source of the second box a query that has as its criteria the current selection in the first combo box. Then in the first combo box add an OnExit event with a macro using the Requery action. In the Control Name box at the bottom of the macro window, enter the...
  5. A

    total or total

    1. Check the name of the text box that you want to sum. Errors most often occur when you refer to something using the wrong name. You must refer specifically to the text box by name in order to tell Access what yuo want totaled. 2. Use the Sum function to total all of the amounts in this field...
  6. A

    Macro to-Select qry-Run rpt-Update qry

    You don't have to run a query before opening a report - just use the query as the record source for the report. Use the command button to open the report in Print Preview, and it will automatically show what you would get from running the query. You can run an update query from a command...
  7. A

    finding out which tab control is selected

    Tab controls use a Page Index to refer to each page, starting with 0 from the left. Check the Page Index property on each page of the tab to be sure of the order. You can then do a simple test of If [TabControlName].Page =1 Then etc., etc. [This message has been edited by Axis (edited 04-29-2000).]
  8. A

    total or total

    Access is smart about calculations in report. A field with the expression =Sum[CustomerOrders] as the record source (assuming CustomerOrders is the name of your field) will give you the total for all customer orders, and you can place it according to what total you want. If you put it in the...
  9. A

    iif won't return value

    Where are you using this expression? I've tested the same expressions several times, and it always works if there is a condition to evaluate. For example, I have a report with two fields, Score and Placement. Score has a control source of the score field in a table, and Placement is unbound...
  10. A

    iif won't return value

    I may be wrong, but I think if you add the real conditional you'll find the expression works. Without an explicit a field or variable, Access is taking whatever variable is open and evaluating it. At least you seem to have gottenr id of your error message.
  11. A

    Expression in calculated control

    Just missing a few parentheses: =IIf([RESOURCE TYPE]="EMPLOYEE",([Sum Of BILLABLE HRS]/[Sum Of EXP HRS ALL]),([Sum Of BILLABLE HRS]/[Sum of ACTUAL HRS]-[Sum of GA07 OTHER NON PAID]))
  12. A

    iif won't return value

    You seem to be missing the full conditional expression, as in Iif([Field] = 1,"",[textvar]) or Iif([Field].Value = 1,"",[textvar])
  13. A

    Page counting and totaling in access reports

    Check out these two papers: How to Reset the Page Number on Group Level in a Report http://support.microsoft.com/support/kb/articles/Q104/7/60.asp?LN=EN-US&SD=gn&FR=0 How to Display "Page # of #" in the Page Header or Page Footer of a Report...
  14. A

    conditional format with Null data

    Look up "IsNull" in Help. You should be able to apply whatever you're doing for an empty string using IsNull.
  15. A

    Sum Expression in Report

    You have the sections of the Iff function transposed. It's Iif(expression,truepart,falsepart). In your example it would be =IIf([TypeOfPump]="Pump1",Sum([FlowRate])). However, assuming these field names are also the name of fields in your table you'd be better served using a DSum function in...
  16. A

    More Help (ie specifics) re, Passing Value to Report.

    Simply set the value of the report control in the OnOpen property of the report: ReportR: OnOpen Me![TextBox] = Forms!frmF!X You must open the report before closing the form, otherwise the reference will not be valid. Variables are not available in the Design Mode.
  17. A

    How do I reference a value from a module in a report?

    If you define the variable in the declaration sections of your code for the form (right under "Option Explicit"), it can be passed anywhere within the form. [This message has been edited by Axis (edited 04-14-2000).]
  18. A

    Axis, i got another question....

    You already have the concept, just think about applying it to the code: If Me![Field1].Value = True Then Me![Field2].Enabled = True Also, this forum is not intended to be a personal mail service. If you want to ask me a question directly, please send it to me at the email address in my...
  19. A

    Axis it worked but........

    Try this If Not IsNull(Me![Field]) Then Me![CommandButton].Enabled= True Me![CommandButton].SetFocus Else MsgBox "You must fill in this field to continue.", vbOKOnly End if
  20. A

    attention AXIS need your help.....

    Sorry - too much of a rush when I answered. Try If Not IsNull(Me![Field]) Then Me![CommandButton].Enabled= True Else MsgBox "You must fill in this field to continue.", vbOKOnly
Back
Top Bottom