Question : From Combo box in another form.. move to record in another form

What I want to do is from a combo box in a form.. based on the selection, have it take you to that record in a master form.  I can get it to the record but the records are filtered.

I want it to just take me to that record but be able to not have the records limited or filtered.

Thanks

Answer : From Combo box in another form.. move to record in another form

> "when I move the MOUSE around at the top of the Screen it makes icons appear and disappear?"
That is a major problem. I have no idea how you can acheive this or how to solve it, appart from the usual:
* compile all modules
* repair and compact
* repair Office installation...
* apply latest patches...

However, I did find out what the syntax error is. I was a bit careless and used a variant global variable. This is not initialized to Null, but to Empty, which brakes the code the first time it is run. I see three ways to change to code...

Private Sub Form_Activate()
    If Not IsNull( gvarFormGotoKey ) And Not IsEmpty( gvarFormGotoKey ) Then
        ' [etc...]

You can use "blunt force" and remove error handling like this:

Private Sub Form_Activate()
On Error Resume Next
    Me.Recordset.FindFirst "ID= " & gvarFormGotoKey
    gvarFormGotoKey = Null
    If Err Then Err.Clear
End Sub

Or make gvarFormGotoKey a long, say "Global glngFormGotoID As Long" and use

Private Sub Form_Activate()
    If glngFormGotoID Then
        Me.Recordset.FindFirst "ID = " & glngFormGotoID
        glngFormGotoID = 0
    End If
End Sub

But is seems JB made his point. By using wizard generated code, you always get a basic error handler in the procedure, which often saves time and avoids confusing bugs...

As for the remaining buggy behavior, I guess it must come from somewhere else. Do you activate the hourglass somewhere using DoCmd.Hourglass? If yes, I should like to take a look at that procedure as well.

Good luck!
Random Solutions  
 
programming4us programming4us