Tom Crowfoot
asked on
Automated Pop up Form
Dear Experts
Im using Access 2003 & have a form which has a list of people (frm_Quick-Search), next to each record is a command button (QuickViewCMD) which fires up a pop up form ("frm_quick_view") so the user can see notes on the person. This all works fine but I have to close the pop up form each time that I want to look at the next person. What I want to be able to do is either
When the persons mouse hovers over the Command Button the form opens up and closes when the mouse moves away.
Or
Some how close the last instance of the form and reopen it to show the relevant record (this might be impossible as the pop has to be opened first & needs a link to show the correct records in the first instance)
Or
Use the logic of ... if frm_quick_view is closed then open where ([people_id]=" & Me![people_id]) If its open change the link ([people_id]=" & Me![people_id])
Private Sub QuickViewCMD_Click()
On Error GoTo Err_Command59_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_quick_view"
stLinkCriteria = "[people_id]=" & Me![people_id]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command59_Click:
Exit Sub
Err_Command59_Click:
MsgBox Err.description
Resume Exit_Command59_Click
End Sub
Can anybody help???
Im using Access 2003 & have a form which has a list of people (frm_Quick-Search), next to each record is a command button (QuickViewCMD) which fires up a pop up form ("frm_quick_view") so the user can see notes on the person. This all works fine but I have to close the pop up form each time that I want to look at the next person. What I want to be able to do is either
When the persons mouse hovers over the Command Button the form opens up and closes when the mouse moves away.
Or
Some how close the last instance of the form and reopen it to show the relevant record (this might be impossible as the pop has to be opened first & needs a link to show the correct records in the first instance)
Or
Use the logic of ... if frm_quick_view is closed then open where ([people_id]=" & Me![people_id]) If its open change the link ([people_id]=" & Me![people_id])
Private Sub QuickViewCMD_Click()
On Error GoTo Err_Command59_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_quick_view"
stLinkCriteria = "[people_id]=" & Me![people_id]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command59_Click:
Exit Sub
Err_Command59_Click:
MsgBox Err.description
Resume Exit_Command59_Click
End Sub
Can anybody help???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's Brilliant, thank you
Private Sub Form_Current()
On error resume next
DoCmd.Close acForm, "frm_quick_view "
End Sub