Connecting Tech Pros Worldwide Help | Site Map

AccessXP and Group control

  #1  
Old August 9th, 2006, 05:25 PM
bobh
Guest
 
Posts: n/a
Hi All,

In AccessXP I put a option group control on a form and using vba I
wrote Case logic. Neither the On-Click or the After Update event of the
control kick off the vba code. What am I missing.

Option Group control name = grpView

On-click or After-update vba code
Select Case grpView
Case 1
Docmd.OpenForm "frmViewClients"
Case 2
Docmd.OpenForm "frmViewAgents"
End Select

thanks for your help
bobh.

  #2  
Old August 9th, 2006, 06:15 PM
jahoobob via AccessMonster.com
Guest
 
Posts: n/a

re: AccessXP and Group control


Try placing the code you have for Case 1 on the OnMouseDown property of the 1
option check box and do the same for Case 2 on the 2 option box.

bobh wrote:
Quote:
>Hi All,
>
>In AccessXP I put a option group control on a form and using vba I
>wrote Case logic. Neither the On-Click or the After Update event of the
>control kick off the vba code. What am I missing.
>
>Option Group control name = grpView
>
>On-click or After-update vba code
>Select Case grpView
>Case 1
>Docmd.OpenForm "frmViewClients"
>Case 2
>Docmd.OpenForm "frmViewAgents"
>End Select
>
>thanks for your help
>bobh.
--
Message posted via http://www.accessmonster.com

  #3  
Old August 9th, 2006, 07:05 PM
salad
Guest
 
Posts: n/a

re: AccessXP and Group control


bobh wrote:
Quote:
Hi All,
>
In AccessXP I put a option group control on a form and using vba I
wrote Case logic. Neither the On-Click or the After Update event of the
control kick off the vba code. What am I missing.
Do you have any options associated with/within the frame?

If you do have some options, click on them. Perhaps the values aren't 1
and 2.

Open up th ecode window and on the vertical bar next to
Select Case grpView
depress the mouse. This will put a red dot next to the command. Now
save and run. This should step you throught the code. If no code gets
executed, you know you are doing something incorrect.

Quote:
>
Option Group control name = grpView
>
On-click or After-update vba code
Select Case grpView
Case 1
Docmd.OpenForm "frmViewClients"
Case 2
Docmd.OpenForm "frmViewAgents"
End Select
>
thanks for your help
bobh.
>
  #4  
Old August 14th, 2006, 04:45 PM
bobh
Guest
 
Posts: n/a

re: AccessXP and Group control


Putting the code in debug mode did nothing, it never got kicked-off.
What I found was I have to have the 'Allow Edits' at the form level set
to 'yes'. The on-click and the after-update event now work form the
option group control. Before I set the Allows edits to yes neither the
check box or button controls would work as well.
Seems very odd that I need to have Allow Edits set to yes at the form
level, I don't remember having to do that in Access97
bobh.

salad wrote:
Quote:
bobh wrote:
Quote:
Hi All,

In AccessXP I put a option group control on a form and using vba I
wrote Case logic. Neither the On-Click or the After Update event of the
control kick off the vba code. What am I missing.
>
Do you have any options associated with/within the frame?
>
If you do have some options, click on them. Perhaps the values aren't 1
and 2.
>
Open up th ecode window and on the vertical bar next to
Select Case grpView
depress the mouse. This will put a red dot next to the command. Now
save and run. This should step you throught the code. If no code gets
executed, you know you are doing something incorrect.
>
>
Quote:

Option Group control name = grpView

On-click or After-update vba code
Select Case grpView
Case 1
Docmd.OpenForm "frmViewClients"
Case 2
Docmd.OpenForm "frmViewAgents"
End Select

thanks for your help
bobh.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
report page breaks bobh answers 1 March 29th, 2007 08:25 PM
Questionaire Tom answers 3 November 13th, 2005 11:01 AM