Search results

  1. D

    Insert works in SQL VIEW but not in VBA

    Awesome. Error messages make debugging so much easier. I had to move the code to AfterInsert so that matching entry was in tblParts. Robert
  2. D

    Any other iRacing fans here?

    I run the Riley: I'm happy for a top 5 on roadies. And the NASCAR iRacing fixed series: Won my split in the Daytona opener this year. WOOT! Ok, so we were the 10th split of 14 or so, but still, I finished without a single scratch. :) Was up to 2nd after halfway mark at Phoenix, but...
  3. D

    Insert works in SQL VIEW but not in VBA

    This code: Private Sub txtPart_LostFocus() Dim db As Database Dim strSQL As String Dim lngPartKey As Long Dim lngSpecNaKey As Long Dim intLoop As Integer If IsNumeric(txtKey) And strPreviousPart <> txtPart Then lngPartKey = Me.txtKey lngSpecNaKey =...
  4. D

    Close all open objects

    I must still be missing something. aob=Nothing 10 Dim aob As AccessObject 20 For Each aob In Forms ' Forms 30 If aob.Name <> "frmMain" Then DoCmd.Close acForm, aob.Name, acSaveYes 40 Next aob 50 For Each aob In Reports...
  5. D

    Close all open objects

    I must be really dense 'cause I can't get it to work. aob = Nothing on the 1st pass, logic goes straight to Error from line 20 Private Sub Form_Unload(Cancel As Integer) On Error GoTo Err_Form_Unload 10 Dim aob As AccessObject 20 For Each aob In Forms...
  6. D

    Close all open objects

    Ok, removed everything except forms and reports but I'm hitting a snag with that: Run-time 438 Object doesn't support this property or method. 140 With CurrentProject 150 For Each aob In .Forms ' Forms 160 If aob.IsLoaded Then 170 If...
  7. D

    MDE - Unable to create

    I'm using Access 2002 and also cannot create an MDE all of a sudden. I created my tables, set up relationships, and slowly started with Main Menu and one form at a time. I would make an MDE every once in a while and then save a copy. I found the problem in my particular case; I copied one...
  8. D

    Close all open objects

    My attempt at this approach, I put it in Main Menu Unload: Private Sub Form_Unload(Cancel As Integer) On Error GoTo Err_Form_Unload 10 Dim aob As AccessObject 20 With CurrentData 30 For Each aob In .AllTables ' Tables 40 If aob.IsLoaded Then 50...
  9. D

    Tip The Ten Commandments of Access

    Wow... First, it is you that feels free to insult anyone that considers these posts of value: Second, I have to prove my OPINION? I'm sorry, I can't pull out the PDFs out of the saddlebags on such a high horse. Where did I say you were a spaghetti-coder? I said "Gotos used in excess makes...
  10. D

    Question Help

    I can't help you with your problem, but a more descriptive title for your thread will help others to help you. Many just ignore threads with zero information in the title. It will also help the next guy that uses the search feature and your thread pops up. Robert
  11. D

    Tip The Ten Commandments of Access

    You missed the point. Gotos used in excess makes for spaghetti. Used wisely it works, but properly structured code rarely needs a goto. Notice I said rarely, not never. For the newcomer looking for a decent example, the Northwind example in Access 2002 is not that bad. At least it shows the use...
  12. D

    All results not shown due to empty fields

    This issue has been nagging at me every since the beginning. I knew I could rearrange my structure, but a lot of code was already done. Now that I am starting over (implementing 10 commandments, error handling in every module, not editting a module as I debug to avoid corruption, etc), I...
  13. D

    Tip The Ten Commandments of Access

    With such a tiny memory I can't remember if this has been covered. Tips to avoid corruption: - turn off Name auto-correct - mentionned as buggy on google. - close everything you open. - dereference objects (have to research more). - turn off record-level locking during development. and...
  14. D

    On Load runs when closing form

    I did a test to see if there was a bug in my version of Access 2002. I figured I'd start at the beginning and eliminate the easy stuff. Created a new database with table and form. I opened the form and my msgboxes in Open, Load and Current came up before the cursor showed up on the form. So...
  15. D

    On Load runs when closing form

    I have a similar problem in Access 2002 Win XP, so I placed checkpoints at the first line of every SUB in fmrMain. - Form_Load does not execute when I start up frmMain. - FrmMain and the 2 nested subforms display normally, data and all. - Form_Load does execute when I click the EXIT button...
  16. D

    MSCOMM Active-X Control

    That read makes me want to cry. I'm finishing up a beta version of an Access 2002 system that uses MSCOMM32.OCX. I made a test folder with a copy of my MDB, copied the OCX into the folder and keep getting UNABLE TO MAKE AN MDE error using MS Access 2002, MS Office Pro. I have Visual Studio 6...
  17. D

    Queries VS Filters in Form with subforms

    Might as well post this too 'cause I'll forget, and it might help someone. To turn on a filter: Me.Form.Filter = "[Key] = " & lngFilterPartID Me.Form.FilterOn = True The part I couldn't find, how to turn off a filter: Form_Main.FilterOn = False Form_Main.Filter = "" FilterOn must be set...
  18. D

    Queries VS Filters in Form with subforms

    Solution: Replace idiot behind keyboard with a monkey, it'll code faster. I was setting the Filter properly, and then clearing it waaaay at the bottom. D'oh... Robert
  19. D

    Queries VS Filters in Form with subforms

    What's the proper way of tackling this? Main form - RecordSource=PART tbl - single layout Inventory form - RecordSource=PART tbl - linked to Main form via Part key - single layout Inventory Detail form - RecordSource=INVENTORY tbl - linked to Inventory form via Part Key - continous layout...
  20. D

    Function in WHERE clause

    1. TYTYTYTYTYTY I can't believe I totally missed those quotes in the threads I found. 2. I know. They were in a module called modPublicVariables but I had moved them there to make things easier for you guys to see my screwup. 3. D'oh... Man, I went through the gazillion threads on here...
Back
Top Bottom