By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,373 Members | 1,763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,373 IT Pros & Developers. It's quick & easy.

AccessXP and Group control

P: 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.

Aug 9 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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:
>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

Aug 9 '06 #2

P: n/a
bobh wrote:
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.

>
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.
Aug 9 '06 #3

P: n/a
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:
bobh wrote:
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.


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.
Aug 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.