Search results

  1. 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...
  2. 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...
  3. 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...
  4. W

    How to Build a Custom Record Delete

    If I add a command button to the Header, that command button does not seem to appear in Datasheet view. Wayne
  5. W

    How to Build a Custom Record Delete

    I should have mentioned that I'd like this code to work within Datasheet view, where the user could otherwise select and delete multiple records. However, I just noticed that KeyDown does not seem to work in this view, nor does a CommandButton appear. So it appears that what I want to do is...
  6. W

    How to Build a Custom Record Delete

    I'm using Access 2003. I'd like to override the default behaviour for deleting records in a form. Specifically, I want to build my own custom delete procedure so that when the user presses the Del button, my code fires to complete the deletion of the selected record(s). In order to do that...
  7. W

    How Can I Access Err.Description Inside the Form_Error Event?

    Thanks for pointing out AccessError. Unfortunately, I still don't get everything that Oracle is sending. When I just allow the ODBC error to display, it looks like this: However, when I print AccessError(DataErr), I see this: I posted this question on UtterAccess, where BananaRepublic...
  8. W

    How Can I Access Err.Description Inside the Form_Error Event?

    Probably a bonehead question . . . I'm trying to extract information from Err.Description within a form's Error event. Alas, Err.Description does not seem to be available from there. I have a form that normally displays in DataSheet view. If a trigger on the Oracle back-end raises an error...
  9. W

    Processing Error Information from Oracle Back-End

    I'm using MS Access 2003 with an Oracle back-end via ODBC. I have Oracle triggers that raise various error numbers on the back end, like this: EXCEPTION WHEN billing_details_exist THEN raise_application_error(-20000, 'Billing details exist for the rate period for rate type ' ||...
  10. W

    Deleting a Temp QueryDef

    I'm using MS Access 2003. I have a custom function that opens a recordset using a temporary pass-thru QueryDef object. Here's the guts of my code: Public Function OpenRecordsetPassThru(ByVal pstrSQL As String, Optional ByVal pstrDatabase As String = "ORACLE", ...) As Recordset On Error...
  11. W

    Setting the Type Property on a Temporary Pass-Thru Query

    I'm using MS Access 2003. I need to create a temporary pass-thru query with Type = dbQSPTBulk. Here's my code: ' Create a temporary pass-thru query Set qdTemp = db.CreateQueryDef("") ' Set properties of temp pass-thru query qdTemp.Connect = strConnectString qdTemp.ODBCTimeout =...
  12. W

    Form.Requery Syntax

    I'm using MS Access 2003. I'm puzzled about some behaviour that I cannot explain. Was hoping someone might be able to illuminate me. I have a form on which I have a combo box, call it cbo1. In its AfterUpdate() event handler, I have the following code...
  13. W

    Misleading Error When Deleting a Record in MS Access

    This was not quite the issue, but it got me working down a path that led to the fix. I'm still not sure what *caused* the problem. However, the form's recordsource (query) had a join to an Oracle view that used a lot more tables than necessary, some with outer joins. (The view was initially...
  14. W

    Misleading Error When Deleting a Record in MS Access

    (Previously posted to Reports section, incorrectly. Sorry.) I'm using MS Access 2003. I have a form that displays in datasheet view. When I select a record and hit my keyboard's Delete button, I see the following error: This error *always* appears when deleting any record from this form...
  15. W

    Mysterious Error when Deleting a Record from Form

    Sorry, I posted to the wrong area. I need to re-post this to the Forms forum. Wayne
  16. W

    Mysterious Error when Deleting a Record from Form

    I'm using MS Access 2003. I have a form that displays in datasheet view. When I select a record and hit my keyboard's Delete button, I see the following error: This error *always* appears when deleting any record from this form. After clicking OK on this error, if I refresh the form, the...
  17. W

    Bizarre Behavior with LIKE Operator

    Hmmm. Your suggestion worked. Weird thing is that I've used the % wildcard in other Access queries, and it's worked. Thanks. Wayne
  18. W

    Bizarre Behavior with LIKE Operator

    I'm using MS Access 2003. I have a SQL Server table with some records (not all) whose "description" column contains a vessel name embedded inside. I'd like to select the records whose description contains one of the vessel names in another table. In SQL Server Mgt Studio, if I run the...
  19. W

    Continuous (Tabular) Forms: How to Move to Next Record, Same Field with Keystroke

    That works great. Never thought it would be so simple. It's too bad that selecting that option doesn't also go to same field in previous record when pressing Shift+Enter (or something like that). But hey, this will do the trick. Thanks! Wayne
  20. W

    Continuous (Tabular) Forms: How to Move to Next Record, Same Field with Keystroke

    I'm using MS Access 2003. I've noticed that with a form in Continuous (Tabular) View, when I click the DownArrow on my keyboard, the focus does not move to the next record, same column, as it does when in Datasheet view. I want to use Continuous view because I need to put command buttons on...
Back
Top Bottom