Search results

  1. F

    How do I get the combo box value?

    What's in a name? In working with Access, allowing Access to name objects for you is fine if you never write code. However, if writing code, I find it best to rename the objects to show what data is being stored there. The name combo51 is not very descriptive and you may find yourself confused...
  2. F

    Error using OpenArgs to transfer multiple values to new form

    I am using the code below to transfer values from one form to another. However, I am getting the following error: "Runtime error '-2147352567 (80020009)': You can't assign a value to this object." Using the immediate window I see the value of each OpenArgs, so it's not a question of the split...
  3. F

    Code in subform to set focus upon failed validation works unless you leave subform

    Sorry I haven't responded to this thread for a while. I had a major report to the government due and had to shift my priorities to that for a while. I made the changes and adopted your BeforeUpdate solution on the form. The only change I needed to make was to put an If statement after the...
  4. F

    Code in subform to set focus upon failed validation works unless you leave subform

    Yes. I'm working on them. If I find myself stuck again, I will certainly enlist your aid. However, if you could answer the question of how to check whether the focus is on the form or subform, that would help me out a lot.
  5. F

    Code in subform to set focus upon failed validation works unless you leave subform

    I appreciate the help. Sorry I haven't gotten back to you earlier, but I've been out of the office. Just a couple of notes regarding my code. Some of the code you changed to notes served a purpose that needs to remain. One part of the code enabled the Other control if "other" was chosen as the...
  6. F

    Code in subform to set focus upon failed validation works unless you leave subform

    Compiled, compacted and repaired copy of database This a clean copy to work with. Thanks again.
  7. F

    Code in subform to set focus upon failed validation works unless you leave subform

    Copy of the Database Attached I've attached a copy of the database so you can actually work with the code. Thanks.
  8. F

    Code in subform to set focus upon failed validation works unless you leave subform

    If I put Cancel = True, then the focus just moves to the next tab field when the user clicks on OK. It doesn't keep focus in that control.
  9. F

    Code in subform to set focus upon failed validation works unless you leave subform

    That part of the code keeps focus on that control so that users can enter data there if they say OK (meaning they really did choose "other" as the audience and need to enter information in the Other field). Otherwise the code clears the Audience field and sets focus back on Audience for them to...
  10. F

    Code in subform to set focus upon failed validation works unless you leave subform

    I'm trying to accomplish a little more than that. It is a vbOKCancel so that the user can choose OK to try again or cancel to erase the value of Audience in case they incorrectly chose "other." Cancel = True would only work with vbOK or vbCritical and wouldn't give the user the opportunity to...
  11. F

    Code in subform to set focus upon failed validation works unless you leave subform

    I'm trying to use code to set validation which checks if the value of Audience is "other" then the value of the control Other cannot be empty. It works fine while I'm in the subform. However, if I click out of the subform it puts focus where the user clicked. I tried putting the code on the...
  12. F

    NotInList not working in some forms, okay in others

    Okay oh wise one. It seems that this resolved the issue. It was a simple matter of an Exit Sub? I am just amazed at how I can mess things up so much with just a couple of words. I don't see that you did anything else, did you? Thanks again. By the way, your helpfulness is like crack...once...
  13. F

    NotInList not working in some forms, okay in others

    Okay. So I eliminate the hidden control and the relationship still exists. However, if I choose to cancel after I've said OK to the event triggered by the NotInList, it still creates a record in tblEventSponsors. Something in the click event on the frmAddSponsor is not undoing the record and...
  14. F

    NotInList not working in some forms, okay in others

    That worked great! However, I'm being left with an empty record in tblEventSponsors when I cancel. I thought the record wasn't supposed to be saved if I canecelled. All of the orphaned records can be cleaned up with a delete query, but I'd rather not have them created in the first place. Any...
  15. F

    NotInList not working in some forms, okay in others

    Database attached as Zip file RG, Here is a copy of my database (cleaned of data). Since this is my first week using Access, I'm sure things aren't as clean as they should be. However, if you would like to take a look, I would be much obliged. Thanks, Dean
  16. F

    NotInList not working in some forms, okay in others

    Nope. That didn't change anything. The issue persists. However, I chose = Null instead of Undo for a reason. Instead of emptying the field with a Null value, your way would perform an Undo which would undo the last entry. This means that if they typed something in and then deleted it and typed...
  17. F

    NotInList not working in some forms, okay in others

    I appreciate the syntax correction. I've only been working with Access for a week and some of the intracacies are a bit overwhelming. The code set the combobox to Null with the code as it was. With your code I'm still running into the same issue (but I'll keep your code as I'm sure it's more...
  18. F

    NotInList not working in some forms, okay in others

    RG, That fixed it. I put that in there earlier in the process to fix a different issue, but that's what I get for thinking. In my attempts to make my database "easy" for the end user, I am trying to automate as much as possible. However, I'm trying to build in 2nd chances as well. Even though...
  19. F

    NotInList not working in some forms, okay in others

    Bad gets worse Now the code is failing in all 3 forms and I haven't changed ANYTHING! I'm using Access 2007 (in compatibility mode for Access 2002 and 2003) on Windows Vista. Is there some instability that can cause code to malfunction?
  20. F

    NotInList not working in some forms, okay in others

    The following example code works fine in one of my forms but does not work correctly in two others. My issue arrives when I enter the new data in frmAddSponser and return to the form that called this form. The Response = acDataErrAdded is supposed to requery the combobox and allow you to exit it...
Back
Top Bottom