Recent content by BarkerD

  1. B

    Need to rollback the SQL DELETE statement

    What you need to do is use a transaction. For an example of how to write transaction code, look at this thread. Transaction Example Hope this will help.
  2. B

    need db advice, input, ideas

    Change your primary key to an Audit Number. Make the carton number a foreign key to the Carton table. You may need to do some re-design of your application before it is ready to be implemented. Ask your boss if there are any other specifications that you need to know about before you...
  3. B

    LDB Viewer for Database version 4.x

    Thanks again, but the information that I require is stored in the .ldb file. It will tell me which connection has caused the database to be marked as corrupt. I already have utilities that can identify all connections to a database including the NT machine name. My problem is that the LDB...
  4. B

    LDB Viewer for Database version 4.x

    Thanks for the file. I have checked out the sample code on the Microsoft website, but it only identifies the machines that are logged into the database. I have been having a very large problem with corruption on a custom made application written in Access 2000. I need to be able to correctly...
  5. B

    LDB Viewer for Database version 4.x

    Does anybody know where I can find an ldb viewer for 4.x version databases. I have downloaded a viewer, LDBView.Zip but it does not correctly identify the suspect state of the database in the database header. Any help would be appreciated. Duane
  6. B

    Cannot successfully change the ColumnCount or ColumnWidths of a Combo Box after it is

    I have actually had the same problem, and was hoping someone may know how to do this correctly. I have a combo-box that is populated by different tables based on another combo-box. Eg: Select Case strCriteria Case "WIP" 'choose WIP table to populate combo-box 'put 3 columns in box 'make...
  7. B

    Breakpoints

    For some reason (I don't know why) Access seems to not execute code on an event. I have had this happen, and this is what I did to solve it. Delete the Event Procedure in the properties box, and then use the code builder to re-link the code in the form module to the event. This could be a...
  8. B

    Password Form

    By entering On Error GoTo Err_cmdpass_Click, you are instructing the machine to go to that particular "label" when an error is encountered. You need to add the line. Err_cmdpass_Click: 'Your error handling code goes here Duane Barker
  9. B

    on nodata, show message then close report

    Put this function call in the Report's No Data Event =ThereIsNoData() Function ThereIsNoData() MsgBox$("There is no information for the criteria that you specified." & Chr(10) & "Please choose the Menu item and try again.") DoCmd.CancelEvent End Function
  10. B

    autonumber - if user doesn't fill info, missing numbers

    You can avoid the issue of duplicated invoice numbers in multi-user environment by generating the new number on the Before_Update event. That way the number is incremented only moments before it is posted. This would not work very well for a sub-form, though Just a thought Duane Barker
  11. B

    Code/SQL experts help

    I find it is always helpful to replace any SQL calls in my code with string variables. It makes the code easier to read, and like Mike said, it is easy to check the SQL statement for errors. I like to use Debug.Print strSQL Duane Barker
  12. B

    code exists but not executing

    I've had this problem occasionally. Try deleting the Event procedure call in the properties box, and then use the code builder to have Access reset the code link. The only other reason I have had this happen was when I changed the control name, and forgot to modify the Procedure. DOH!! HTH...
  13. B

    Unique Number

    Do you need to store the number, or just display it? I would save all 3 numbers as separate fields, and then concatenate them to display. Eg: CustNum field Control Source = [1Digit] & [Autonumber] & [2Digit] To ensure no duplication, use all 3 fields as the primary key. Duane Barker [This...
  14. B

    update two fields based on criteria from one

    Sure. You need to use Recordset objects. *Note: This code will only work if you have Microsoft DAO object library referenced. if you don't add it in the Editor window from Tools -> References * Dim db as DAO.Database Dim rst as DAO.Recordset Dim strSQL as String Set db=CurrentDB strSQL =...
  15. B

    watching variables

    At any time during code execution, you can ask for the value of any variable. Use the syntax: Debug.Print Variable This is very handy for checking concatenated strings, etc. Duane Barker
Top Bottom