Search results

  1. T

    IIF statment with OR

    Hi Pat - Thanks for your advice. I wonder if you can explain this more simply for me or point me toward an example (I'm not very experienced with Access or writing code). I'm not sure which part of my approach is wrong - trying to use the cboBox to select specific records in my query, or how I...
  2. T

    IIF statment with OR

    Jon, Thank you, that worked. Neil, I'm sorry, but it seems like you might just be going mad....I'm not sure what you don't understand. Based on what is selected in my combo box, I want to select 1 or 2 plant_type_ids: ie, if 1 (Trees) is chosen in the form combo box, then I want...
  3. T

    IIF statment with OR

    That doesn't work either. Both work as criteria alone, but not as part of my IIf statement. Any other suggestions? Thanks. :confused:
  4. T

    IIF statment with OR

    Hi I am using a list box in a form (frmPlantListDialog) as the criteria for a query. The list box has 4 rows. I want the criteria to say: IIf([Forms]![frmPlantListDialog]![cboPType]=1,1 Or 2,IIf([Forms]![frmPlantListDialog]![cboPType]=2,3 Or...
  5. T

    Restricting data entered in form

    Yes, that worked. Thank you.
  6. T

    Restricting data entered in form

    Thank you - that worked. However, when I enter a number greater than the Final Qty, I still get the message that I must save the field before executing the GotoControl or SetFocus method after my message that says "Quantity approved must be less than...". It's not a big deal, I just click End...
  7. T

    Restricting data entered in form

    Thank you. I tried what you suggested, but am now I'm getting an error message that says "you must save the field before you execute the SetFocus".
  8. T

    Restricting data entered in form

    Hi - I want to put a restriction on data entered in a 1st subform (“sfr2”), but don’t know how to write the code. Want I want to say is: If sfr2.cboBox = 6, then sfr2.QtyApproved cannot be greater than sfr1.FinalQty. I tried as an After Update Event: If Me.sfr2.cboBox = 6 then...
  9. T

    ComboBox as Control Source

    Well, that was easy. I guess I was using ...[RowSource].Column () which is why it didn't work. Thank you!
  10. T

    ComboBox as Control Source

    I have a report that opens from a form. The report looks to the combo box selection for the info to be displayed. I want that combo box selection to be displayed on the report, but I want column 2, not column 1. I put a text box on the report with the control source as: =...
  11. T

    RecordSource in Report

    Thank you for your comments and help on this - and the offer to work on the db. I will experiment with the form as you suggested. This particular database probably won't be used for much more than its current use, so I will just make my life easier and keep it as is with 2 separate queries and 2...
  12. T

    RecordSource in Report

    Yes, the 2 queries are based on the same table, but I am doing different calculations within the queries. The columns stay the same - just the calculations within the Expression Builder are different and refer to different columns in the query. I suppose the most efficient thing to do is to...
  13. T

    RecordSource in Report

    Hi I would like to use 2 queries for one Report rather than having two separate reports or manually changing the RecordSource. I had the RecordSource refer to a combo box in a form for the correct query, but I get an error message saying there is no such thing. I've searched through the...
  14. T

    filtering for subreport

    Hi - I have a filter that works in the Subreport when it stands alone but gives me an error when I put the Subreport into the Main Report. The Subreport is not linked to the Mainreport. My filter in the Subreport, in the OnOpen Event procedure is: Me.Filter = "Comments Like '*XX*'" FilterOn...
  15. T

    More than one IIF statement in query

    Thanks for replying. The nz() changing values to 0 worked - exactly what I needed. :)
  16. T

    More than one IIF statement in query

    Hi - What is the code that I should use to have more than one IIF statement in a query - in the Expression Builder? AND doesn't work. I am trying to add 3 columns, but some columns have a null value and some don't, so I am saying IIF IsNull([Column1]), then add other 2 columns, otherwise add...
  17. T

    Query criteria for a check box

    Hi - Thanks for your replies. I'm still working on this. It's probably simple, but I don't know code and I'm fairly new to Access. I have the checkbox so that when it's checked, the combo is not enabled, and when it’s not checked the combo is enabled. Triple State is set to True. However...
  18. T

    Query criteria for a check box

    I am using a combo box in a form to set the criteria for a check box in my query. I want the user to be able to choose whether they want only the checked boxes to show, only the unchecked boxes, or all of the boxes. I have set the combo column 1 as -1(for true) and 0 (for false), which works...
  19. T

    Form as Query Parameter

    Thank you pdx-man! That worked - exactly what I was looking for!:)
  20. T

    Form as Query Parameter

    The query is for a report. I have a form with a button to run the query, but I still have to use the paramters to put in the Contract id number in order to get a report for a specific contract. That may be because I haven't figured out how to get the button to do the query only for the specific...
Back
Top Bottom