Search results

  1. N

    Type mismatch with year() function

    Worked perfect. Thanks both for suffering through my long explanation :) and @Brian, I think in this case it was learning to read faster haha. I had quite the essay
  2. N

    Type mismatch with year() function

    I have a table called Inflation Rates and one called Project Info. Project Info has the field "Date Completed", and Inflation Rates has "Date Year" and "Cost Index". My first query is called "Project List Query" which has the fields "Project Info.*" as well as the calculated fields: Year...
  3. N

    Searching for records in a subform with a combo box located in main form

    OK, so I made an executive decision and reworked the structure of what I am trying to do in my grand scheme. So, I solved this problem by replacing the issue. My new setup works much better, but I'm having a small issue, which I'll outline in a new thread here...
  4. N

    Navigating records in the main form through a button in a subform

    So my main form is a marketing contacts viewing form, and in this I have a subform which has a list of all contacts in the database (its a small one). The subform is a continuous form formatted like a datasheet, so I can view essential data for multiple contacts at a time, while still allowing...
  5. N

    Searching for records in a subform with a combo box located in main form

    I believe that part is correct. I used DoCmd.SearchForRecord acForm, Forms![Marketing Targets]!MarketingTargetsSubform.Form.Name, acFirst, "[Contact ID]=" & TempVars!ActiveControlValue where "Marketing Targets" = main form "MarketingTargetsSubform" = subform control name (container)...
  6. N

    Searching for records in a subform with a combo box located in main form

    Well, that fixed my syntax problem, for which I am very grateful. But now I have a new error: "The object 'MarketingTargetsSingle' isn't open." Where "MarketingTargetsSingle" is the object name (not control name) of my subform. Except it is, it is loaded when I open the main form, and I can...
  7. N

    Searching for records in a subform with a combo box located in main form

    Ok so I tried DoCmd.SearchForRecord acForm, Forms![Marketing Targets2]!MarketingTargetsSubform.Form.MarketingTargetsSingle, acFirst, "[Contact ID]=" & TempVars!ActiveControlValue where "MarketingTargetsSingle" is the object name of my subform, to no avail. The error message now reads...
  8. N

    Combo box recordsource based on IF statement?

    I'm not sure if it's a typo, but off the top of my head I can tell you "Elseif" is supposed to be "Else If" (There is a space). That would certainly mess up your code...
  9. N

    Searching for records in a subform with a combo box located in main form

    So I have a main form, and in the header I have a combo box where a user can search for contacts, but I want the box to search for records in a subform, not on the main form. On the combo box's After Update property I have this code: Private Sub cboNameSearch_AfterUpdate() On Error GoTo...
  10. N

    How to reference selections in a subform w/ a button

    Thanks a lot guys. Its been ages since I used continuous forms, I had completely forgotten about them. Using that method will also open up a few other functionality items I was grappling with. Appreciate the help.
  11. N

    How to reference selections in a subform w/ a button

    Correct, however when I put a button in the details section, it doesn't display in the datasheet subform on my main form
  12. N

    How to reference selections in a subform w/ a button

    No, not really. :/ I already know how to do that, and have implemented it several times in this database. What is stumping me is how to reference a highlighted record in a subform. So, using your code, DoCmd.OpenForm "SecondFormName", , , "FieldName = " & Me.ControlName would work, except...
  13. N

    How to reference selections in a subform w/ a button

    I have a form, Marketing Targets, which pulls records from a simple table that contains a field called Contact ID (key field). This form has a subform, Action Items subform, which also has the field Contact ID. The subform displays records that share the same Contact ID with the current record...
  14. N

    unable to use IIF statement results as critera in query

    Very true. All programs have their quirks, Access included. Emily, how is your field set up? At the moment is it stored in a separate query/table, which you then access in a different query? Or is the calculated field located in the same query in which you are trying to place a criterion?
  15. N

    Using text formulae as field names in a query

    Ahh, really don't know why I didn't think of that before. I was just so set on using the field names as a text formula. Thanks a bunch, that should work fine.
  16. N

    unable to use IIF statement results as critera in query

    Well typically when you have a calculated field, such as hers, the value is stored for use as soon as it is calculated, therefore it should be immediately accessible to use as a criteria. for instance creating a field in a sales table IIf(AnnualSales/12>1500, "Good Salesman", "Bad...
  17. N

    Update Query criteria is not null

    This sounds like a query is not what you want...the problem could easily be fixed using a simple VBA function, using an if statement i.e. If Forms!Form_1!MyField <> Null Then Forms!Form_2!MyOtherField = Forms!Form_1!MyField End If
  18. N

    unable to use IIF statement results as critera in query

    Is the field with the IIF statement located in a query or a table? And you say that the field does store the value returned by the IIF statement? If this is the case then any criteria statement should function fine; the value returned by the IIF statement is a simple text value. Finally, have...
  19. N

    Using text formulae as field names in a query

    I'm attempting to use a text formula as a field name in a query. The scenario is this: I have a field named Design Phase, and also three named GMP Owner Bid, DD Owner Bid, and SD Owner Bid. Design Phase is a lookup field, with three possible values (GMP, DD, and SD). See where I'm going with...
  20. N

    Updating combo-box source based on another field in a form

    worked perfect. appreciate the help.
Back
Top Bottom