Search results

  1. K

    Invoking function on form with Toolbar button

    Hi, I have a window with a command button that calls a function on the window. That works great, but I want to replace the command button with a toolbar button on a custom toolbar. I don't understand in general how to achieve this. Here's what I have so far: 1. A window named Performance...
  2. K

    question: Tab control update to filter records

    Hi, I think you should be concatenating the value of Me!LocationTabs.value with the rest of the SQL statement, as in this example from the A2K help: RecordSource Property Example Sub cmboCompanyName_AfterUpdate() Dim strNewRecord As String strNewRecord = "SELECT * FROM Customers " _...
  3. K

    Using a query as a filter for a form

    Hi Andy, Looks like you have missed a comma before acFormEdit. According to the syntax of OpenForm, that would use the enumerated value acFormEdit as a Where condition for the form's result set. Hope that helps, Keith.
  4. K

    Conditional Formatting - bug in Access 2K?

    Hi Rich, That worked great, thanks for the tip! Because I didn't want decimal places in most of my fields, and I needed 0 to be black, in the end I used: 0[Red];-0[Black];0[Black] and specified the decimal places where needed in the Decimal Places property. I also had some fields that had been...
  5. K

    Conditional Formatting - bug in Access 2K?

    Hi, I have a form that I display as Single Form. I've arranged a bunch of data values for the current year as a column down the form, with another column of corresponding values for the previous year to the right of it. To the right of that I want a 3rd column showing the net change in each...
  6. K

    Problem converting to ADO with Recordset

    Hi, Yes, I've tried Me.RecordSource = rst if that's what you mean. I get Compile Error: Type mismatch. Thanks, Keith.
  7. K

    Problem converting to ADO with Recordset

    Hi, I tried adapting my approach using your example, and ther first part works great (executing the append query) but the second part (assigning a query to the Form's recordset) doesn't work. Here's the code: Option Compare Database Private Sub Form_Open(Cancel As Integer) Dim stOpenArgs()...
  8. K

    Problem converting to ADO with Recordset

    Hi, Thanks for the suggestions, but I really want to be able to use the query as-is, without manipulating the query syntax. I have it working great in DAO, and the syntax is quite terse compared to ADO, but I hate the idea that I could never upsize to SQL server if needed. Here's the DAO code...
  9. K

    Problem converting to ADO with Recordset

    Hi dcx693, I tried your suggestion, but it produced a different set of errors. Let me go back to the beginning. I have a query with parameters, a mix of Short and Text(255) parameter fields. The query works OK when I run it in Access. I want to open a form using the query as the source of the...
  10. K

    Problem converting to ADO with Recordset

    Hi, I am trying to convert my application to ADO, and have a problem with assigning a recordset to the Recordset object of the form, in the Open event: Dim qdf As ADODB.Command Dim rst As ADODB.Recordset -code to set up qdf with a query object and parameters etc- Set rst =...
  11. K

    Setting values in unbound control on bound form

    Hi Pat, Don't worry, I have come across SAP before, so wasn't offended! I will try your suggested approach with 2 subforms, but I suspect I will run into limitations Of Access, because I will need to pass a number of parameter values to both queries. But I do need to display an at-a-glance...
  12. K

    Setting values in unbound control on bound form

    Hi Pat, Actually, in this case SAP is the acronym for my application! ("Station Action Plans", in case you're interested). However, I won't dispute the accuracy of your comment! You were right, by including the reference to SAP_Month.MonthStartDate in the quotes, I was invalidating my query...
  13. K

    Setting values in unbound control on bound form

    Hi, Thanks for the suggestion of using DSum. I had no luck with this. This is my query using DSum: SELECT SAP_Month.MonthStartDate, SAP_Year_By_Month_Parameter_Query_Target.Target, DSum("1","SAP_Incident","Year = 2003 AND TimeOfCall< SAP_Month.MonthStartDate") FROM (SAP_Month INNER JOIN...
  14. K

    Setting values in unbound control on bound form

    Because Target is the value I want to be able to edit, and Actual is a field calculated as a sum of values from another table. If I try to join the sum of values with the table containing Target in a query, the query becomes non-updateable. I can't find a way to force it to be editable. The Help...
  15. K

    Setting values in unbound control on bound form

    Can't see the attachment from my previous post, so trying again.
  16. K

    Setting values in unbound control on bound form

    Hi, I've attached an image of the form. The Control Source for the form is assigned dynamically in the form's Open event. That populates the values in Month and Target. I can't use a single query to populate all 3 fields, because it would be non-editable, and I need the Target to be editable...
  17. K

    Setting values in unbound control on bound form

    Hi, My first post! I have a form which is initially unbound, but then I assign a record set to it in the Open event as follows: Set Me.Recordset = rst 2 of the fields in the form have names corresponding to the field names in the query referenced by rst. So I guess that makes it a bound...
Back
Top Bottom