John Clark
John.Clark at niagaracounty.com
Tue Aug 22 15:37:15 CDT 2006
I am working on a DB that I am trying to finish up. I've shown it to the users and they like it, but of course there are a few alterations to be made. A couple of them are actually just things I overlooked. I have a form where defendants are entered into a system. Actually, it is all names associated with a case (i.e. lawyers, judges, victims, defendants, etc.) and the system sorts them out by their check box designations on entry or edit. I have a drop-down box in place to choose a lawyer...same w/many of the fields, but I'll use lawyer here. I used a union query to place a "<CREATE NEW ENTRY>" option, at the top of the drop-down. If the user clicks on this option, they are taken to the form to enter new names, and the default check is placed, depending on where you came from (I use OpenArgs for this). It also knows where to go back to. The code used for this is: ____________________________________________________________________________________ Private Sub txtAttorney_BeforeUpdate(Cancel As Integer) If txtAttorney.SelText = "<ENTER NAME>" Then DoCmd.OpenForm "frm_Subjects", acNormal, , , acFormAdd, acWindowNormal, "ATT" Me.Visible = False End If End Sub ____________________________________________________________________________________ However, I have tried adding the same ability to the "Charges" field, and the last liine gives me trouble. It says, "You can't hide a control that has the focus." I know what this means, but I just copied the code from elsewhere in the same program, and it works there. Any ideas? John W. Clark