Search results

  1. W

    Screen.activecontrol In Form_Current

    This sounds intriguing. Can you give a sample of code you might use? Wayne
  2. W

    Screen.activecontrol In Form_Current

    I've tried both Screen and Form.ActiveControl, with the same result. Yes, I've tried that, but if I just ignore the error, then I might leave controls enabled that should be disabled. Even if I want to disable the control, I only want to SetFocus if I'm sitting on the to-be-disabled control...
  3. W

    Screen.activecontrol In Form_Current

    I'm working with Access 2003. I have a subform on which I need to set the focus away from controls I need to disable, but only if the focus is on the columns to be disabled. I need to do this in the Form_Current event handler, where I run code like this: fNeedToSetFocus =...
  4. W

    #Deleted When Inserting To Oracle BE After Explicitly Nulling a Numeric Field

    Actually, I just discovered the solution, which is simple: If I run a passthru query to grab the next sequence value in the form's BeforeInsert() event handler (rather than waiting for the trigger to assign the PK on the back-end), everything works. Wayne
  5. W

    #Deleted When Inserting To Oracle BE After Explicitly Nulling a Numeric Field

    I'm using Access 2003. I hope someone can shed some light on a problem I have with an MS Access subform connected to an Oracle back-end. If I do the following, I see #Deleted on all the fields of an inserted record in a subform: 1. Insert the new record. 2. Enter a value in a nullable field...
  6. W

    Different Report Margins on First Page?

    Actually, there's more to it than I've said. This report is in the form of a mail merge, so page 1 of the report is really just page 1 of the first letter. (Each new letter is for a new Client Number grouping.) So I really need the first page of each letter adjusted with a smaller top margin...
  7. W

    Different Report Margins on First Page?

    The logo is on a pre-printed form (i.e., the logo is not stored in Access), so on pages 2+ it gets overprinted with letter text from Access (unless we make the margin bigger for all pages). But because the logo is on the extreme right side of the form, page 1 would then have lots of blank space...
  8. W

    Different Report Margins on First Page?

    Sorry, I should have been more explicit. I want the margin on page 1 to be smaller than on succeeding pages. I know it's an unsual question. I'm printing a form letter to company letterhead. Because of the layout of the first page, the company logo never overlaps with the text of the letter...
  9. W

    Different Report Margins on First Page?

    I just want the first page to have a 1/2 inch top margin and pages 2+ to have a 1 inch margin. Wayne
  10. W

    Different Report Margins on First Page?

    I'm using Access 2003. Is it possible to set the top margin on the first page of an Access report different from all the other pages? Thanks for any help you can give. Wayne
  11. W

    Anomalies when Canceling a Record Update

    I had tried both of these before my original post. Just to be sure, I tried again, but no joy. I have concluded that this is an Access 2003 bug. I've moved the validation to the Form_BeforeUpdate event handler. Thanks. Wayne
  12. W

    Anomalies when Canceling a Record Update

    I'm using Access 2003. I have a simple form that is exhibiting behavior that seems very bizarre. I've attached the mdb. Here's how to see what I mean: 1. Open frmEmployee 2. In the Vehicle combobox, select the first entry (2005 Pontiac Montana). Note that for this vehicle, Inactive = No...
  13. W

    Can-Grow Field At Bottom Of Page Gets Cut Off

    I discovered that the following works: - set fldUnitNo as a group in the report, with Keep Together set to Yes - set the new group header and footer to zero height It also works if I simply set Keep Together = Yes for the Detail band. Too simple. Wayne
  14. W

    Can-Grow Field At Bottom Of Page Gets Cut Off

    I am using MS Access 2003. I have a report whose Detail band contains a zero-height Comment field positioned at the bottom of the other single row of fields. It has Can Grow = Yes, so it sits waiting to grow if there's any data in this Comment field. (See attachment 1, where this Comment...
  15. W

    How to Build a Custom Record Delete

    Actually, if I just set Allow Deletions = No for the form, my custom routines based on pressing Del still seem to work, and the menu selections are disabled. Wayne
  16. W

    How to Build a Custom Record Delete

    If I thus bypass Access's default record-deletion process when pressing Del in this way, is there also a way to turn off the menu item Edit | Delete Record? I don't want the user to be able to delete records using the Access default process, including the menus, unless I can somehow substitute...
  17. W

    How Can I Know How Many Full Records Have Been Selected?

    After playing with this a bit, I think this works: If Me.SelHeight > 0 And Me.SelWidth = GetColumnCount Then ... End If Private Function GetColumnCount() As Integer On Error GoTo GetColumnCountErr ' Declarations & Setup Static sintColumnCount As Integer Dim ctl As Control...
  18. W

    How Can I Know How Many Full Records Have Been Selected?

    In a form's VBA code, I'd like to know whether a full record has been selected, like when the user selects one or more rows before deleting with the Del key. Is this possible? According to http://msdn.microsoft.com/en-us/library/office/ff823187.aspx, Me.SelHeight returns the number of rows...
  19. W

    How to Build a Custom Record Delete

    This is my preferred technique. I'll loop through the selected records to build my SQL statement, then issue the SQL Delete Statement and requery. I'm working on an existing form, and I need to make it behave as closely to before as possible, so I need to actually delete the records. I'm...
  20. W

    How to Build a Custom Record Delete

    That's beautiful. It works! If I add the bolded code: Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyDelete Then If Me.SelHeight > 0 Then MsgBox "Delete Records!" KeyCode = 0 End If End If End Sub it comes...
Back
Top Bottom