Search results

  1. W

    How to Open a Form from Switchboard and Add Filtering

    Actually, when the form opens, the Form_Open event sets the default filter, so this won't work. However, you gave me some other useful tips. Thanks. Wayne
  2. W

    How to Open a Form from Switchboard and Add Filtering

    Instead, could I just select "Run Code" in the Switchboard Manager, then write a Module function that opens the form and sets the args, as you suggested? That way, I wouldn't have to change the Switchboard form's code. (Seems like it might be a bit cleaner that way.) Thanks. Wayne
  3. W

    How to Open a Form from Switchboard and Add Filtering

    In the default Switchboard that Access creates, the buttons have the following in the On Click event: =HandleButtonClick(n)where n = the order of the Switchboard button clicked. So if I understand you correctly, I need to add some code in function HandleButtonClick so say something like, "if...
  4. W

    How to Open a Form from Switchboard and Add Filtering

    I should add that I know there is a Switchboard argument where I would enter the name of the form to open, but can I just add more to that argument string to tell it which filter to apply? Thanks. Wayne
  5. W

    How to Open a Form from Switchboard and Add Filtering

    Could you please elaborate on how I would implement Option 2? In the interests of not duplicating code unnecessarily, I'd prefer not to use Option 1. Thanks. Wayne
  6. W

    How to Open a Form from Switchboard and Add Filtering

    I'm using Access 2003. I have a form I'd like to open from two Switchboard items. In one case, I want it just to open with a default filter I have defined in the form's Open event. In the other I want to apply a different filter. Is this possible? Can I add something to the form name in the...
  7. W

    Saving a Record with Aggregates

    I'm using MS Access 2003. I have a pair of tables in a typical Master/Detail relationship. (I'll call them M and D). I also have a Continuous form displaying records from table M with aggregates from the related table D. (Record Source is a query that joins the two and creates the aggregates.)...
  8. W

    Losing Order By in a Form

    I was talking about the *contents* of the Record Source being different. Case 1 Record Source: tblLiaStageDetail Order By: OrderReferenceNumber, ShippingWeek, LiaStatusCode, LastUpdateDateTime When I open the form and sort on-the-fly by LastUpdateDateTime, I see the following when I then...
  9. W

    Losing Order By in a Form

    I'm using MS Access 2003. Probably a bonehead question, but I'm puzzled about something. When I enter a Record Source and an Order By property for a form, I expect it to retain those settings. However, if I open the form and sort the records differently, the Order By property is changed to the...
  10. W

    Using CurrentDb.Execute with Parameters

    I don't want to actually display the query window, just do the insert. My understanding of DoCmd.OpenQuery is that it will display it. Wayne
  11. W

    Using CurrentDb.Execute with Parameters

    Yes, I had considered that, but my SQL statement is quite large, so I was hoping I could use the saved query rather than creating a huge inline SQL statement.
  12. W

    Using CurrentDb.Execute with Parameters

    I'm using MS Access 2003. I have not been able to find any examples of using the CurrentDb.Execute command with parameters. Specifically, I have a predefined query that copies a record from one table to another, but it requires an ID parameter to know which record to copy. I'd like to run...
  13. W

    VBA to Turn Filtering Off for Subform

    Here's a bit more info. If I add the following command to the Form_Current event, I get error 2455: Forms!frmTugErrorCorrection.subCsrArchiveDetailFilter.Form.FilterOn = False But if I remove the command from Form_Current, then open the main form in View mode and go to the Immediate...
  14. W

    VBA to Turn Filtering Off for Subform

    I'm using Access 2003.
  15. W

    VBA to Turn Filtering Off for Subform

    Yes, the subform control that I want to filter is on a tab control. The OnCurrent event in which I'm putting the code to turn filtering off is on a subform that is not on a tab control (i.e., sitting right on the main form). But I thought that placing a subform on a tab control was equivalent...
  16. W

    VBA to Turn Filtering Off for Subform

    It's in the OnCurrent event of subform1 (or more precisely, in the OnCurrent event of the Source Object housed in the subform1 control).
  17. W

    VBA to Turn Filtering Off for Subform

    The subform control is named subCsrArchiveDetailFilter Its Source Object is named: frmCsrArchiveDetailFilter I'm using the code: With Me.Parent.subCsrArchiveDetailFilter.Form .Filter = vbNullString .FilterOn = False End With But I still get the error.
  18. W

    VBA to Turn Filtering Off for Subform

    I get the following error when I try your code: Any ideas?
  19. W

    VBA to Turn Filtering Off for Subform

    I'm using MS Access 2003. I have a form containing a subform control sub1 whose Source Object is frm1. I also have (on the same form) another subform control sub2 whose Source Object is frm2. Both subforms display in Continuous view. Subform sub2 offers the user the ability to filter its...
  20. W

    Deferring Command Button's Clicked Event Until after Current

    Thanks for editing your post. I was scratching my head wondering why it wasn't working. But it's working now! Woohoo! Anyway, kudos to both you and mdlueck. BTW, any chance of getting a Coles notes of what your additional code does to make this work? (I had tried injecting "Me.txtCurrent =...
Back
Top Bottom