Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 9th, 2006, 05:25 PM
bobh
Guest
 
Posts: n/a
Default AccessXP and Group control

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
Default 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
Default 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
Default 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.
 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles