If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form Focus - Acccess 2007
I am opening a form by utilizing a macro initiated by the "Double Click"
property on a control of another form. For some reason the form opens but does not get the focus. This has never happened to me before; however, Access 2007 is new to me. I have tried to follow up the "OpenForm" Action of the Macro with the "SelectObject" action (hoping to force the focus on to the newly opened form) but this does not work. Why is this happening, and what can I do about it? Thanks Very Much, Chuck |
#2
|
|||
|
|||
Form Focus - Acccess 2007
Hi Chuck,
I have the same problem and i dont find any solution :-( Bob Internet: www.logicielappui.com Courriel : "Chuck" a écrit dans le message de ... I am opening a form by utilizing a macro initiated by the "Double Click" property on a control of another form. For some reason the form opens but does not get the focus. This has never happened to me before; however, Access 2007 is new to me. I have tried to follow up the "OpenForm" Action of the Macro with the "SelectObject" action (hoping to force the focus on to the newly opened form) but this does not work. Why is this happening, and what can I do about it? Thanks Very Much, Chuck |
#3
|
|||
|
|||
Form Focus - Acccess 2007
Thank you Bob. I was afraid of that. The only solution that I can think of
is opening the form in the "Dialog" Window Mode. "Bob" wrote: Hi Chuck, I have the same problem and i dont find any solution :-( Bob Internet: www.logicielappui.com Courriel : "Chuck" a écrit dans le message de ... I am opening a form by utilizing a macro initiated by the "Double Click" property on a control of another form. For some reason the form opens but does not get the focus. This has never happened to me before; however, Access 2007 is new to me. I have tried to follow up the "OpenForm" Action of the Macro with the "SelectObject" action (hoping to force the focus on to the newly opened form) but this does not work. Why is this happening, and what can I do about it? Thanks Very Much, Chuck |
#4
|
|||
|
|||
Form Focus - Acccess 2007
Here's some code, I've been using for this very thing. I copied it from an
Access template some time ago, and it still works in newer versions of access. I think it's basically the same work around that you found, so maybe it's the way to do it. Private Sub Store_DblClick(Cancel As Integer) On Error GoTo Err_Store_DblClick Dim lngStore As String If IsNull(Me![Store]) Then Me![Store].Text = "" Else lngStore = Me![Store] Me![Store] = Null End If DoCmd.OpenForm "Stores", , , , , acDialog, "GotoNew" Me![Store].Requery If lngStore Null Then Me![Store] = lngStore Exit_Store_DblClick: Exit Sub Err_Store_DblClick: MsgBox Err.Description Resume Exit_Store_DblClick End Sub "Chuck" wrote: Thank you Bob. I was afraid of that. The only solution that I can think of is opening the form in the "Dialog" Window Mode. "Bob" wrote: Hi Chuck, I have the same problem and i dont find any solution :-( Bob Internet: www.logicielappui.com Courriel : "Chuck" a écrit dans le message de ... I am opening a form by utilizing a macro initiated by the "Double Click" property on a control of another form. For some reason the form opens but does not get the focus. This has never happened to me before; however, Access 2007 is new to me. I have tried to follow up the "OpenForm" Action of the Macro with the "SelectObject" action (hoping to force the focus on to the newly opened form) but this does not work. Why is this happening, and what can I do about it? Thanks Very Much, Chuck |
#5
|
|||
|
|||
Form Focus - Acccess 2007
Thanks Christopher.
"Christopher Robin" wrote: Here's some code, I've been using for this very thing. I copied it from an Access template some time ago, and it still works in newer versions of access. I think it's basically the same work around that you found, so maybe it's the way to do it. Private Sub Store_DblClick(Cancel As Integer) On Error GoTo Err_Store_DblClick Dim lngStore As String If IsNull(Me![Store]) Then Me![Store].Text = "" Else lngStore = Me![Store] Me![Store] = Null End If DoCmd.OpenForm "Stores", , , , , acDialog, "GotoNew" Me![Store].Requery If lngStore Null Then Me![Store] = lngStore Exit_Store_DblClick: Exit Sub Err_Store_DblClick: MsgBox Err.Description Resume Exit_Store_DblClick End Sub "Chuck" wrote: Thank you Bob. I was afraid of that. The only solution that I can think of is opening the form in the "Dialog" Window Mode. "Bob" wrote: Hi Chuck, I have the same problem and i dont find any solution :-( Bob Internet: www.logicielappui.com Courriel : "Chuck" a écrit dans le message de ... I am opening a form by utilizing a macro initiated by the "Double Click" property on a control of another form. For some reason the form opens but does not get the focus. This has never happened to me before; however, Access 2007 is new to me. I have tried to follow up the "OpenForm" Action of the Macro with the "SelectObject" action (hoping to force the focus on to the newly opened form) but this does not work. Why is this happening, and what can I do about it? Thanks Very Much, Chuck |
Thread Tools | |
Display Modes | |
|
|