A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form Focus - Acccess 2007



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2008, 12:55 AM posted to microsoft.public.access.forms
Chuck
external usenet poster
 
Posts: 372
Default 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
  #4  
Old June 27th, 2008, 06:46 AM posted to microsoft.public.access.forms
Christopher Robin
external usenet poster
 
Posts: 42
Default 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  
Old June 27th, 2008, 05:26 PM posted to microsoft.public.access.forms
Chuck
external usenet poster
 
Posts: 372
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.